diff options
| author | Philipp Oppermann <dev@phil-opp.com> | 2019-07-17 17:25:43 +0200 |
|---|---|---|
| committer | Philipp Oppermann <dev@phil-opp.com> | 2019-07-17 17:25:43 +0200 |
| commit | c9c73f5d2550f00e9b952e65d05421721b73ee6d (patch) | |
| tree | b7d91712b0797cf8a4526d92d1c2c51fd2cabc31 /src/libcore/ptr | |
| parent | fed12fad7019051fc875a06d3699d660ea1e226a (diff) | |
Refer to `add` method instead of `offset`
The `align_offset` method returns an `usize`, so using `add` makes more sense than using `offset`, which takes an `isize`.
Diffstat (limited to 'src/libcore/ptr')
| -rw-r--r-- | src/libcore/ptr/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ptr/mod.rs b/src/libcore/ptr/mod.rs index 337f3440b43..e8c988b921a 100644 --- a/src/libcore/ptr/mod.rs +++ b/src/libcore/ptr/mod.rs @@ -1534,7 +1534,7 @@ impl<T: ?Sized> *const T { /// `usize::max_value()`. /// /// The offset is expressed in number of `T` elements, and not bytes. The value returned can be - /// used with the `offset` method. + /// used with the `add` method. /// /// There are no guarantees whatsover that offsetting the pointer will not overflow or go /// beyond the allocation that the pointer points into. It is up to the caller to ensure that @@ -2335,7 +2335,7 @@ impl<T: ?Sized> *mut T { /// `usize::max_value()`. /// /// The offset is expressed in number of `T` elements, and not bytes. The value returned can be - /// used with the `offset` method. + /// used with the `add` method. /// /// There are no guarantees whatsover that offsetting the pointer will not overflow or go /// beyond the allocation that the pointer points into. It is up to the caller to ensure that |
