File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -731,7 +731,7 @@ impl<T: ?Sized> *const T {
731731 /// This computes the same value that [`offset_from`](#method.offset_from)
732732 /// would compute, but with the added precondition that the offset is
733733 /// guaranteed to be non-negative. This method is equivalent to
734- /// `usize::from (self.offset_from(origin)).unwrap_unchecked()`,
734+ /// `usize::try_from (self.offset_from(origin)).unwrap_unchecked()`,
735735 /// but it provides slightly more information to the optimizer, which can
736736 /// sometimes allow it to optimize slightly better with some backends.
737737 ///
Original file line number Diff line number Diff line change @@ -904,7 +904,7 @@ impl<T: ?Sized> *mut T {
904904 /// This computes the same value that [`offset_from`](#method.offset_from)
905905 /// would compute, but with the added precondition that the offset is
906906 /// guaranteed to be non-negative. This method is equivalent to
907- /// `usize::from (self.offset_from(origin)).unwrap_unchecked()`,
907+ /// `usize::try_from (self.offset_from(origin)).unwrap_unchecked()`,
908908 /// but it provides slightly more information to the optimizer, which can
909909 /// sometimes allow it to optimize slightly better with some backends.
910910 ///
You can’t perform that action at this time.
0 commit comments