diff options
| author | Jan Niehusmann <jan@gondor.com> | 2018-10-14 08:06:36 +0000 |
|---|---|---|
| committer | Jan Niehusmann <jan@gondor.com> | 2018-10-14 20:24:01 +0000 |
| commit | e8ec4987a8b26ea0cca076796689d2b1c00812a5 (patch) | |
| tree | 09d35373cc2bfd5470f9f678b0416659ed269044 /src/libcore | |
| parent | 2bab4bf486aca3c3ba105e9931f56f6ddf445c3d (diff) | |
| download | rust-e8ec4987a8b26ea0cca076796689d2b1c00812a5.tar.gz rust-e8ec4987a8b26ea0cca076796689d2b1c00812a5.zip | |
clarify pointer add/sub function safety concerns
Ralf Jung made the same changes to the offset functions' documentation in commit fb089156. As add/sub just call offset, the same limitation applies here, as well. Removed emphasis on review request by @joshtriplett
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/ptr.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index b8d7fcffbcc..19a4fb93c30 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -1255,7 +1255,7 @@ impl<T: ?Sized> *const T { /// Behavior: /// /// * Both the starting and resulting pointer must be either in bounds or one - /// byte past the end of an allocated object. + /// byte past the end of the same allocated object. /// /// * The computed offset, **in bytes**, cannot overflow an `isize`. /// @@ -1312,7 +1312,7 @@ impl<T: ?Sized> *const T { /// Behavior: /// /// * Both the starting and resulting pointer must be either in bounds or one - /// byte past the end of an allocated object. + /// byte past the end of the same allocated object. /// /// * The computed offset cannot exceed `isize::MAX` **bytes**. /// @@ -1893,7 +1893,7 @@ impl<T: ?Sized> *mut T { /// Behavior: /// /// * Both the starting and resulting pointer must be either in bounds or one - /// byte past the end of an allocated object. + /// byte past the end of the same allocated object. /// /// * The computed offset, **in bytes**, cannot overflow an `isize`. /// @@ -1950,7 +1950,7 @@ impl<T: ?Sized> *mut T { /// Behavior: /// /// * Both the starting and resulting pointer must be either in bounds or one - /// byte past the end of an allocated object. + /// byte past the end of the same allocated object. /// /// * The computed offset cannot exceed `isize::MAX` **bytes**. /// |
