Skip to content

Commit b2625e2

Browse files
committed
fix nitpicks from review
1 parent 3ba3934 commit b2625e2

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

library/core/src/intrinsics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,7 @@ pub(crate) fn is_nonoverlapping<T>(src: *const T, dst: *const T, count: usize) -
22092209
/// dst.reserve(src_len);
22102210
///
22112211
/// unsafe {
2212-
/// // The call to offset is always safe because `Vec` will never
2212+
/// // The call to add is always safe because `Vec` will never
22132213
/// // allocate more than `isize::MAX` bytes.
22142214
/// let dst_ptr = dst.as_mut_ptr().add(dst_len);
22152215
/// let src_ptr = src.as_ptr();

library/core/src/sync/atomic.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ impl<T> AtomicPtr<T> {
15541554
/// Offsets the pointer's address by adding `val` *bytes*, returning the
15551555
/// previous pointer.
15561556
///
1557-
/// This is equivalent to using [`wrapping_add`] and [`cast`] to atomically
1557+
/// This is equivalent to using [`wrapping_byte_add`] to atomically
15581558
/// perform `ptr = ptr.wrapping_byte_add(val)`.
15591559
///
15601560
/// `fetch_byte_add` takes an [`Ordering`] argument which describes the
@@ -1565,8 +1565,7 @@ impl<T> AtomicPtr<T> {
15651565
/// **Note**: This method is only available on platforms that support atomic
15661566
/// operations on [`AtomicPtr`].
15671567
///
1568-
/// [`wrapping_add`]: pointer::wrapping_add
1569-
/// [`cast`]: pointer::cast
1568+
/// [`wrapping_byte_add`]: pointer::wrapping_byte_add
15701569
///
15711570
/// # Examples
15721571
///
@@ -1591,7 +1590,7 @@ impl<T> AtomicPtr<T> {
15911590
/// Offsets the pointer's address by subtracting `val` *bytes*, returning the
15921591
/// previous pointer.
15931592
///
1594-
/// This is equivalent to using [`wrapping_sub`] and [`cast`] to atomically
1593+
/// This is equivalent to using [`wrapping_byte_sub`] to atomically
15951594
/// perform `ptr = ptr.wrapping_byte_sub(val)`.
15961595
///
15971596
/// `fetch_byte_sub` takes an [`Ordering`] argument which describes the
@@ -1602,8 +1601,7 @@ impl<T> AtomicPtr<T> {
16021601
/// **Note**: This method is only available on platforms that support atomic
16031602
/// operations on [`AtomicPtr`].
16041603
///
1605-
/// [`wrapping_sub`]: pointer::wrapping_sub
1606-
/// [`cast`]: pointer::cast
1604+
/// [`wrapping_byte_sub`]: pointer::wrapping_byte_sub
16071605
///
16081606
/// # Examples
16091607
///

0 commit comments

Comments
 (0)