File tree 2 files changed +2
-2
lines changed
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 {
731
731
/// This computes the same value that [`offset_from`](#method.offset_from)
732
732
/// would compute, but with the added precondition that the offset is
733
733
/// 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()`,
735
735
/// but it provides slightly more information to the optimizer, which can
736
736
/// sometimes allow it to optimize slightly better with some backends.
737
737
///
Original file line number Diff line number Diff line change @@ -904,7 +904,7 @@ impl<T: ?Sized> *mut T {
904
904
/// This computes the same value that [`offset_from`](#method.offset_from)
905
905
/// would compute, but with the added precondition that the offset is
906
906
/// 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()`,
908
908
/// but it provides slightly more information to the optimizer, which can
909
909
/// sometimes allow it to optimize slightly better with some backends.
910
910
///
You can’t perform that action at this time.
0 commit comments