File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -979,9 +979,8 @@ impl<T> AtomicPtr<T> {
979
979
/// let some_ptr = AtomicPtr::new(ptr);
980
980
///
981
981
/// let other_ptr = &mut 10;
982
- /// let another_ptr = &mut 10;
983
982
///
984
- /// let value = some_ptr.compare_and_swap(other_ptr, another_ptr , Ordering::Relaxed);
983
+ /// let value = some_ptr.compare_and_swap(ptr, other_ptr , Ordering::Relaxed);
985
984
/// ```
986
985
#[ inline]
987
986
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1021,9 +1020,8 @@ impl<T> AtomicPtr<T> {
1021
1020
/// let some_ptr = AtomicPtr::new(ptr);
1022
1021
///
1023
1022
/// let other_ptr = &mut 10;
1024
- /// let another_ptr = &mut 10;
1025
1023
///
1026
- /// let value = some_ptr.compare_exchange(other_ptr, another_ptr ,
1024
+ /// let value = some_ptr.compare_exchange(ptr, other_ptr ,
1027
1025
/// Ordering::SeqCst, Ordering::Relaxed);
1028
1026
/// ```
1029
1027
#[ inline]
You can’t perform that action at this time.
0 commit comments