File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -633,7 +633,7 @@ impl<T: ?Sized> *const T {
633
633
}
634
634
635
635
/// Calculates the offset from a pointer using wrapping arithmetic.
636
- /// (convenience for `.wrapping_offset((count as isize).wrapping_sub ())`)
636
+ /// (convenience for `.wrapping_offset((count as isize).wrapping_neg ())`)
637
637
///
638
638
/// `count` is in units of T; e.g., a `count` of 3 represents a pointer
639
639
/// offset of `3 * size_of::<T>()` bytes.
Original file line number Diff line number Diff line change @@ -740,7 +740,7 @@ impl<T: ?Sized> *mut T {
740
740
}
741
741
742
742
/// Calculates the offset from a pointer using wrapping arithmetic.
743
- /// (convenience for `.wrapping_offset((count as isize).wrapping_sub ())`)
743
+ /// (convenience for `.wrapping_offset((count as isize).wrapping_neg ())`)
744
744
///
745
745
/// `count` is in units of T; e.g., a `count` of 3 represents a pointer
746
746
/// offset of `3 * size_of::<T>()` bytes.
You can’t perform that action at this time.
0 commit comments