@@ -582,7 +582,7 @@ impl<T: ?Sized> *const T {
582582 intrinsics:: ptr_mask ( self . cast :: < ( ) > ( ) , mask) . with_metadata_of ( self )
583583 }
584584
585- /// Calculates the distance between two pointers. The returned value is in
585+ /// Calculates the distance between two pointers within the same allocation . The returned value is in
586586 /// units of T: the distance in bytes divided by `mem::size_of::<T>()`.
587587 ///
588588 /// This is equivalent to `(self as isize - origin as isize) / (mem::size_of::<T>() as isize)`,
@@ -677,7 +677,7 @@ impl<T: ?Sized> *const T {
677677 unsafe { intrinsics:: ptr_offset_from ( self , origin) }
678678 }
679679
680- /// Calculates the distance between two pointers. The returned value is in
680+ /// Calculates the distance between two pointers within the same allocation . The returned value is in
681681 /// units of **bytes**.
682682 ///
683683 /// This is purely a convenience for casting to a `u8` pointer and
@@ -695,7 +695,7 @@ impl<T: ?Sized> *const T {
695695 unsafe { self . cast :: < u8 > ( ) . offset_from ( origin. cast :: < u8 > ( ) ) }
696696 }
697697
698- /// Calculates the distance between two pointers, *where it's known that
698+ /// Calculates the distance between two pointers within the same allocation , *where it's known that
699699 /// `self` is equal to or greater than `origin`*. The returned value is in
700700 /// units of T: the distance in bytes is divided by `mem::size_of::<T>()`.
701701 ///
@@ -790,7 +790,7 @@ impl<T: ?Sized> *const T {
790790 unsafe { intrinsics:: ptr_offset_from_unsigned ( self , origin) }
791791 }
792792
793- /// Calculates the distance between two pointers, *where it's known that
793+ /// Calculates the distance between two pointers within the same allocation , *where it's known that
794794 /// `self` is equal to or greater than `origin`*. The returned value is in
795795 /// units of **bytes**.
796796 ///
0 commit comments