Skip to content

Commit

Permalink
consistent wording
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 19, 2023
1 parent 3ec8ffd commit db0eb2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions library/core/src/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,8 @@ impl<T: ?Sized> *const T {
/// such large allocations either.)
///
/// The requirement for pointers to be derived from the same allocated object is primarily
/// needed for `const`-compatibility: at compile-time, pointers into *different* allocated
/// objects do not have a known distance to each other. However, the requirement also exists at
/// needed for `const`-compatibility: the distance between pointers into *different* allocated
/// objects is not known at compile-time. However, the requirement also exists at
/// runtime and may be exploited by optimizations. If you wish to compute the difference between
/// pointers that are not guaranteed to be from the same allocation, use `(self as
/// usize).sub(origin as usize) / mem::size_of::<T>()`.
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/ptr/mut_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,8 @@ impl<T: ?Sized> *mut T {
/// such large allocations either.)
///
/// The requirement for pointers to be derived from the same allocated object is primarily
/// needed for `const`-compatibility: at compile-time, pointers into *different* allocated
/// objects do not have a known distance to each other. However, the requirement also exists at
/// needed for `const`-compatibility: the distance between pointers into *different* allocated
/// objects is not known at compile-time. However, the requirement also exists at
/// runtime and may be exploited by optimizations. If you wish to compute the difference between
/// pointers that are not guaranteed to be from the same allocation, use `(self as
/// usize).sub(origin as usize) / mem::size_of::<T>()`.
Expand Down

0 comments on commit db0eb2e

Please sign in to comment.