Skip to content

Commit 8841f26

Browse files
committed
atomic doc: fix statement
1 parent b47a442 commit 8841f26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libcore/sync/atomic.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ impl AtomicBool {
289289
/// Stores a value into the `bool` if the current value is the same as the `current` value.
290290
///
291291
/// The return value is a result indicating whether the new value was written and containing
292-
/// the previous value. On success this value is guaranteed to be equal to `new`.
292+
/// the previous value. On success this value is guaranteed to be equal to `current`.
293293
///
294294
/// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of this
295295
/// operation. The first describes the required ordering if the operation succeeds while the
@@ -633,7 +633,7 @@ impl<T> AtomicPtr<T> {
633633
/// Stores a value into the pointer if the current value is the same as the `current` value.
634634
///
635635
/// The return value is a result indicating whether the new value was written and containing
636-
/// the previous value. On success this value is guaranteed to be equal to `new`.
636+
/// the previous value. On success this value is guaranteed to be equal to `current`.
637637
///
638638
/// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of this
639639
/// operation. The first describes the required ordering if the operation succeeds while the
@@ -886,7 +886,7 @@ macro_rules! atomic_int {
886886
///
887887
/// The return value is a result indicating whether the new value was written and
888888
/// containing the previous value. On success this value is guaranteed to be equal to
889-
/// `new`.
889+
/// `current`.
890890
///
891891
/// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of
892892
/// this operation. The first describes the required ordering if the operation succeeds

0 commit comments

Comments
 (0)