Skip to content

Commit c9c73f5

Browse files
committed
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`.
1 parent fed12fa commit c9c73f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/ptr/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ impl<T: ?Sized> *const T {
15341534
/// `usize::max_value()`.
15351535
///
15361536
/// The offset is expressed in number of `T` elements, and not bytes. The value returned can be
1537-
/// used with the `offset` method.
1537+
/// used with the `add` method.
15381538
///
15391539
/// There are no guarantees whatsover that offsetting the pointer will not overflow or go
15401540
/// 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 {
23352335
/// `usize::max_value()`.
23362336
///
23372337
/// The offset is expressed in number of `T` elements, and not bytes. The value returned can be
2338-
/// used with the `offset` method.
2338+
/// used with the `add` method.
23392339
///
23402340
/// There are no guarantees whatsover that offsetting the pointer will not overflow or go
23412341
/// beyond the allocation that the pointer points into. It is up to the caller to ensure that

0 commit comments

Comments
 (0)