@@ -252,7 +252,8 @@ impl AtomicBool {
252
252
253
253
/// Stores a value into the bool if the current value is the same as the expected value.
254
254
///
255
- /// If the return value is equal to `old` then the value was updated.
255
+ /// The return value is always the previous value. If it is equal to `old`, then the value was
256
+ /// updated.
256
257
///
257
258
/// `swap` also takes an `Ordering` argument which describes the memory ordering of this
258
259
/// operation.
@@ -489,7 +490,8 @@ impl AtomicIsize {
489
490
490
491
/// Stores a value into the isize if the current value is the same as the expected value.
491
492
///
492
- /// If the return value is equal to `old` then the value was updated.
493
+ /// The return value is always the previous value. If it is equal to `old`, then the value was
494
+ /// updated.
493
495
///
494
496
/// `compare_and_swap` also takes an `Ordering` argument which describes the memory ordering of
495
497
/// this operation.
@@ -676,7 +678,8 @@ impl AtomicUsize {
676
678
677
679
/// Stores a value into the usize if the current value is the same as the expected value.
678
680
///
679
- /// If the return value is equal to `old` then the value was updated.
681
+ /// The return value is always the previous value. If it is equal to `old`, then the value was
682
+ /// updated.
680
683
///
681
684
/// `compare_and_swap` also takes an `Ordering` argument which describes the memory ordering of
682
685
/// this operation.
@@ -873,7 +876,8 @@ impl<T> AtomicPtr<T> {
873
876
874
877
/// Stores a value into the pointer if the current value is the same as the expected value.
875
878
///
876
- /// If the return value is equal to `old` then the value was updated.
879
+ /// The return value is always the previous value. If it is equal to `old`, then the value was
880
+ /// updated.
877
881
///
878
882
/// `compare_and_swap` also takes an `Ordering` argument which describes the memory ordering of
879
883
/// this operation.
0 commit comments