File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -479,6 +479,10 @@ impl AtomicBool {
479479 /// ```
480480 #[ inline]
481481 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
482+ #[ rustc_deprecated(
483+ since = "1.50.0" ,
484+ reason = "Use `compare_exchange` or `compare_exchange_weak` instead"
485+ ) ]
482486 #[ cfg( target_has_atomic = "8" ) ]
483487 pub fn compare_and_swap ( & self , current : bool , new : bool , order : Ordering ) -> bool {
484488 match self . compare_exchange ( current, new, order, strongest_failure_ordering ( order) ) {
@@ -1058,6 +1062,10 @@ impl<T> AtomicPtr<T> {
10581062 /// ```
10591063 #[ inline]
10601064 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1065+ #[ rustc_deprecated(
1066+ since = "1.50.0" ,
1067+ reason = "Use `compare_exchange` or `compare_exchange_weak` instead"
1068+ ) ]
10611069 #[ cfg( target_has_atomic = "ptr" ) ]
10621070 pub fn compare_and_swap ( & self , current : * mut T , new : * mut T , order : Ordering ) -> * mut T {
10631071 match self . compare_exchange ( current, new, order, strongest_failure_ordering ( order) ) {
@@ -1582,6 +1590,10 @@ assert_eq!(some_var.load(Ordering::Relaxed), 10);
15821590```" ) ,
15831591 #[ inline]
15841592 #[ $stable]
1593+ #[ rustc_deprecated(
1594+ since = "1.50.0" ,
1595+ reason = "Use `compare_exchange` or `compare_exchange_weak` instead" )
1596+ ]
15851597 #[ $cfg_cas]
15861598 pub fn compare_and_swap( & self ,
15871599 current: $int_type,
You can’t perform that action at this time.
0 commit comments