File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 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> {
979979 /// let some_ptr = AtomicPtr::new(ptr);
980980 ///
981981 /// let other_ptr = &mut 10;
982- /// let another_ptr = &mut 10;
983982 ///
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);
985984 /// ```
986985 #[ inline]
987986 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1021,9 +1020,8 @@ impl<T> AtomicPtr<T> {
10211020 /// let some_ptr = AtomicPtr::new(ptr);
10221021 ///
10231022 /// let other_ptr = &mut 10;
1024- /// let another_ptr = &mut 10;
10251023 ///
1026- /// let value = some_ptr.compare_exchange(other_ptr, another_ptr ,
1024+ /// let value = some_ptr.compare_exchange(ptr, other_ptr ,
10271025 /// Ordering::SeqCst, Ordering::Relaxed);
10281026 /// ```
10291027 #[ inline]
You can’t perform that action at this time.
0 commit comments