diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs index 658b1312c496..47d9deb62ff6 100644 --- a/src/libcore/sync/atomic.rs +++ b/src/libcore/sync/atomic.rs @@ -289,7 +289,7 @@ pub fn compare_and_swap(&self, current: bool, new: bool, order: Ordering) -> boo /// Stores a value into the `bool` if the current value is the same as the `current` value. /// /// The return value is a result indicating whether the new value was written and containing - /// the previous value. On success this value is guaranteed to be equal to `new`. + /// the previous value. On success this value is guaranteed to be equal to `current`. /// /// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of this /// operation. The first describes the required ordering if the operation succeeds while the @@ -633,7 +633,7 @@ pub fn compare_and_swap(&self, current: *mut T, new: *mut T, order: Ordering) -> /// Stores a value into the pointer if the current value is the same as the `current` value. /// /// The return value is a result indicating whether the new value was written and containing - /// the previous value. On success this value is guaranteed to be equal to `new`. + /// the previous value. On success this value is guaranteed to be equal to `current`. /// /// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of this /// operation. The first describes the required ordering if the operation succeeds while the @@ -886,7 +886,7 @@ pub fn compare_and_swap(&self, /// /// The return value is a result indicating whether the new value was written and /// containing the previous value. On success this value is guaranteed to be equal to - /// `new`. + /// `current`. /// /// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of /// this operation. The first describes the required ordering if the operation succeeds