diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-27 13:04:38 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-27 13:04:38 -0700 |
| commit | 1c78478c1249cb007e60a97fa38fcfafbf895ad0 (patch) | |
| tree | d32bd3b770b11f83a1bd38755be860b4bb17399c | |
| parent | 828c36932a227e3689d10db8ec9edc19ba0af6c4 (diff) | |
| parent | 1a6188aa073d3806b0d4766cbbfaa43a34ac87fa (diff) | |
| download | rust-1c78478c1249cb007e60a97fa38fcfafbf895ad0.tar.gz rust-1c78478c1249cb007e60a97fa38fcfafbf895ad0.zip | |
rollup merge of #23793: steveklabnik/gh21668
Fixes #21668
| -rw-r--r-- | src/libcore/atomic.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libcore/atomic.rs b/src/libcore/atomic.rs index 4bbbfbaace9..91b4b46ac39 100644 --- a/src/libcore/atomic.rs +++ b/src/libcore/atomic.rs @@ -252,7 +252,8 @@ impl AtomicBool { /// Stores a value into the bool if the current value is the same as the expected value. /// - /// If the return value is equal to `old` then the value was updated. + /// The return value is always the previous value. If it is equal to `old`, then the value was + /// updated. /// /// `swap` also takes an `Ordering` argument which describes the memory ordering of this /// operation. @@ -489,7 +490,8 @@ impl AtomicIsize { /// Stores a value into the isize if the current value is the same as the expected value. /// - /// If the return value is equal to `old` then the value was updated. + /// The return value is always the previous value. If it is equal to `old`, then the value was + /// updated. /// /// `compare_and_swap` also takes an `Ordering` argument which describes the memory ordering of /// this operation. @@ -676,7 +678,8 @@ impl AtomicUsize { /// Stores a value into the usize if the current value is the same as the expected value. /// - /// If the return value is equal to `old` then the value was updated. + /// The return value is always the previous value. If it is equal to `old`, then the value was + /// updated. /// /// `compare_and_swap` also takes an `Ordering` argument which describes the memory ordering of /// this operation. @@ -873,7 +876,8 @@ impl<T> AtomicPtr<T> { /// Stores a value into the pointer if the current value is the same as the expected value. /// - /// If the return value is equal to `old` then the value was updated. + /// The return value is always the previous value. If it is equal to `old`, then the value was + /// updated. /// /// `compare_and_swap` also takes an `Ordering` argument which describes the memory ordering of /// this operation. |
