@@ -581,8 +581,7 @@ impl AtomicBool {
581
581
/// `failure` describes the required ordering for the load operation that takes place when
582
582
/// the comparison fails. Using [`Acquire`] as success ordering makes the store part
583
583
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
584
- /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
585
- /// and must be equivalent to or weaker than the success ordering.
584
+ /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`].
586
585
///
587
586
/// **Note:** This method is only available on platforms that support atomic
588
587
/// operations on `u8`.
@@ -640,8 +639,7 @@ impl AtomicBool {
640
639
/// `failure` describes the required ordering for the load operation that takes place when
641
640
/// the comparison fails. Using [`Acquire`] as success ordering makes the store part
642
641
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
643
- /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
644
- /// and must be equivalent to or weaker than the success ordering.
642
+ /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`].
645
643
///
646
644
/// **Note:** This method is only available on platforms that support atomic
647
645
/// operations on `u8`.
@@ -905,8 +903,7 @@ impl AtomicBool {
905
903
/// Using [`Acquire`] as success ordering makes the store part of this
906
904
/// operation [`Relaxed`], and using [`Release`] makes the final successful
907
905
/// load [`Relaxed`]. The (failed) load ordering can only be [`SeqCst`],
908
- /// [`Acquire`] or [`Relaxed`] and must be equivalent to or weaker than the
909
- /// success ordering.
906
+ /// [`Acquire`] or [`Relaxed`].
910
907
///
911
908
/// **Note:** This method is only available on platforms that support atomic
912
909
/// operations on `u8`.
@@ -1265,8 +1262,7 @@ impl<T> AtomicPtr<T> {
1265
1262
/// `failure` describes the required ordering for the load operation that takes place when
1266
1263
/// the comparison fails. Using [`Acquire`] as success ordering makes the store part
1267
1264
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
1268
- /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1269
- /// and must be equivalent to or weaker than the success ordering.
1265
+ /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`].
1270
1266
///
1271
1267
/// **Note:** This method is only available on platforms that support atomic
1272
1268
/// operations on pointers.
@@ -1311,8 +1307,7 @@ impl<T> AtomicPtr<T> {
1311
1307
/// `failure` describes the required ordering for the load operation that takes place when
1312
1308
/// the comparison fails. Using [`Acquire`] as success ordering makes the store part
1313
1309
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
1314
- /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1315
- /// and must be equivalent to or weaker than the success ordering.
1310
+ /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`].
1316
1311
///
1317
1312
/// **Note:** This method is only available on platforms that support atomic
1318
1313
/// operations on pointers.
@@ -1368,8 +1363,7 @@ impl<T> AtomicPtr<T> {
1368
1363
/// Using [`Acquire`] as success ordering makes the store part of this
1369
1364
/// operation [`Relaxed`], and using [`Release`] makes the final successful
1370
1365
/// load [`Relaxed`]. The (failed) load ordering can only be [`SeqCst`],
1371
- /// [`Acquire`] or [`Relaxed`] and must be equivalent to or weaker than the
1372
- /// success ordering.
1366
+ /// [`Acquire`] or [`Relaxed`].
1373
1367
///
1374
1368
/// **Note:** This method is only available on platforms that support atomic
1375
1369
/// operations on pointers.
@@ -1850,8 +1844,7 @@ macro_rules! atomic_int {
1850
1844
/// `failure` describes the required ordering for the load operation that takes place when
1851
1845
/// the comparison fails. Using [`Acquire`] as success ordering makes the store part
1852
1846
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
1853
- /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1854
- /// and must be equivalent to or weaker than the success ordering.
1847
+ /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`].
1855
1848
///
1856
1849
/// **Note**: This method is only available on platforms that support atomic operations on
1857
1850
#[ doc = concat!( "[`" , $s_int_type, "`]." ) ]
@@ -1902,8 +1895,7 @@ macro_rules! atomic_int {
1902
1895
/// `failure` describes the required ordering for the load operation that takes place when
1903
1896
/// the comparison fails. Using [`Acquire`] as success ordering makes the store part
1904
1897
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
1905
- /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1906
- /// and must be equivalent to or weaker than the success ordering.
1898
+ /// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`].
1907
1899
///
1908
1900
/// **Note**: This method is only available on platforms that support atomic operations on
1909
1901
#[ doc = concat!( "[`" , $s_int_type, "`]." ) ]
@@ -2140,8 +2132,7 @@ macro_rules! atomic_int {
2140
2132
///
2141
2133
/// Using [`Acquire`] as success ordering makes the store part
2142
2134
/// of this operation [`Relaxed`], and using [`Release`] makes the final successful load
2143
- /// [`Relaxed`]. The (failed) load ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
2144
- /// and must be equivalent to or weaker than the success ordering.
2135
+ /// [`Relaxed`]. The (failed) load ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`].
2145
2136
///
2146
2137
/// **Note**: This method is only available on platforms that support atomic operations on
2147
2138
#[ doc = concat!( "[`" , $s_int_type, "`]." ) ]
@@ -2658,23 +2649,22 @@ unsafe fn atomic_compare_exchange<T: Copy>(
2658
2649
let ( val, ok) = unsafe {
2659
2650
match ( success, failure) {
2660
2651
( Relaxed , Relaxed ) => intrinsics:: atomic_cxchg_relaxed_relaxed ( dst, old, new) ,
2661
- // (Relaxed, Acquire) => intrinsics::atomic_cxchg_relaxed_acquire(dst, old, new),
2662
- // (Relaxed, SeqCst) => intrinsics::atomic_cxchg_relaxed_seqcst(dst, old, new),
2652
+ ( Relaxed , Acquire ) => intrinsics:: atomic_cxchg_relaxed_acquire ( dst, old, new) ,
2653
+ ( Relaxed , SeqCst ) => intrinsics:: atomic_cxchg_relaxed_seqcst ( dst, old, new) ,
2663
2654
( Acquire , Relaxed ) => intrinsics:: atomic_cxchg_acquire_relaxed ( dst, old, new) ,
2664
2655
( Acquire , Acquire ) => intrinsics:: atomic_cxchg_acquire_acquire ( dst, old, new) ,
2665
- // (Acquire, SeqCst) => intrinsics::atomic_cxchg_acquire_seqcst(dst, old, new),
2656
+ ( Acquire , SeqCst ) => intrinsics:: atomic_cxchg_acquire_seqcst ( dst, old, new) ,
2666
2657
( Release , Relaxed ) => intrinsics:: atomic_cxchg_release_relaxed ( dst, old, new) ,
2667
- // (Release, Acquire) => intrinsics::atomic_cxchg_release_acquire(dst, old, new),
2668
- // (Release, SeqCst) => intrinsics::atomic_cxchg_release_seqcst(dst, old, new),
2658
+ ( Release , Acquire ) => intrinsics:: atomic_cxchg_release_acquire ( dst, old, new) ,
2659
+ ( Release , SeqCst ) => intrinsics:: atomic_cxchg_release_seqcst ( dst, old, new) ,
2669
2660
( AcqRel , Relaxed ) => intrinsics:: atomic_cxchg_acqrel_relaxed ( dst, old, new) ,
2670
2661
( AcqRel , Acquire ) => intrinsics:: atomic_cxchg_acqrel_acquire ( dst, old, new) ,
2671
- // (AcqRel, SeqCst) => intrinsics::atomic_cxchg_acqrel_seqcst(dst, old, new),
2662
+ ( AcqRel , SeqCst ) => intrinsics:: atomic_cxchg_acqrel_seqcst ( dst, old, new) ,
2672
2663
( SeqCst , Relaxed ) => intrinsics:: atomic_cxchg_seqcst_relaxed ( dst, old, new) ,
2673
2664
( SeqCst , Acquire ) => intrinsics:: atomic_cxchg_seqcst_acquire ( dst, old, new) ,
2674
2665
( SeqCst , SeqCst ) => intrinsics:: atomic_cxchg_seqcst_seqcst ( dst, old, new) ,
2675
2666
( _, AcqRel ) => panic ! ( "there is no such thing as an acquire-release failure ordering" ) ,
2676
2667
( _, Release ) => panic ! ( "there is no such thing as a release failure ordering" ) ,
2677
- _ => panic ! ( "a failure ordering can't be stronger than a success ordering" ) ,
2678
2668
}
2679
2669
} ;
2680
2670
if ok { Ok ( val) } else { Err ( val) }
@@ -2693,23 +2683,22 @@ unsafe fn atomic_compare_exchange_weak<T: Copy>(
2693
2683
let ( val, ok) = unsafe {
2694
2684
match ( success, failure) {
2695
2685
( Relaxed , Relaxed ) => intrinsics:: atomic_cxchgweak_relaxed_relaxed ( dst, old, new) ,
2696
- // (Relaxed, Acquire) => intrinsics::atomic_cxchgweak_relaxed_acquire(dst, old, new),
2697
- // (Relaxed, SeqCst) => intrinsics::atomic_cxchgweak_relaxed_seqcst(dst, old, new),
2686
+ ( Relaxed , Acquire ) => intrinsics:: atomic_cxchgweak_relaxed_acquire ( dst, old, new) ,
2687
+ ( Relaxed , SeqCst ) => intrinsics:: atomic_cxchgweak_relaxed_seqcst ( dst, old, new) ,
2698
2688
( Acquire , Relaxed ) => intrinsics:: atomic_cxchgweak_acquire_relaxed ( dst, old, new) ,
2699
2689
( Acquire , Acquire ) => intrinsics:: atomic_cxchgweak_acquire_acquire ( dst, old, new) ,
2700
- // (Acquire, SeqCst) => intrinsics::atomic_cxchgweak_acquire_seqcst(dst, old, new),
2690
+ ( Acquire , SeqCst ) => intrinsics:: atomic_cxchgweak_acquire_seqcst ( dst, old, new) ,
2701
2691
( Release , Relaxed ) => intrinsics:: atomic_cxchgweak_release_relaxed ( dst, old, new) ,
2702
- // (Release, Acquire) => intrinsics::atomic_cxchgweak_release_acquire(dst, old, new),
2703
- // (Release, SeqCst) => intrinsics::atomic_cxchgweak_release_seqcst(dst, old, new),
2692
+ ( Release , Acquire ) => intrinsics:: atomic_cxchgweak_release_acquire ( dst, old, new) ,
2693
+ ( Release , SeqCst ) => intrinsics:: atomic_cxchgweak_release_seqcst ( dst, old, new) ,
2704
2694
( AcqRel , Relaxed ) => intrinsics:: atomic_cxchgweak_acqrel_relaxed ( dst, old, new) ,
2705
2695
( AcqRel , Acquire ) => intrinsics:: atomic_cxchgweak_acqrel_acquire ( dst, old, new) ,
2706
- // (AcqRel, SeqCst) => intrinsics::atomic_cxchgweak_acqrel_seqcst(dst, old, new),
2696
+ ( AcqRel , SeqCst ) => intrinsics:: atomic_cxchgweak_acqrel_seqcst ( dst, old, new) ,
2707
2697
( SeqCst , Relaxed ) => intrinsics:: atomic_cxchgweak_seqcst_relaxed ( dst, old, new) ,
2708
2698
( SeqCst , Acquire ) => intrinsics:: atomic_cxchgweak_seqcst_acquire ( dst, old, new) ,
2709
2699
( SeqCst , SeqCst ) => intrinsics:: atomic_cxchgweak_seqcst_seqcst ( dst, old, new) ,
2710
2700
( _, AcqRel ) => panic ! ( "there is no such thing as an acquire-release failure ordering" ) ,
2711
2701
( _, Release ) => panic ! ( "there is no such thing as a release failure ordering" ) ,
2712
- _ => panic ! ( "a failure ordering can't be stronger than a success ordering" ) ,
2713
2702
}
2714
2703
} ;
2715
2704
if ok { Ok ( val) } else { Err ( val) }
0 commit comments