@@ -38,7 +38,7 @@ impl AtomicBool {
38
38
success : Ordering ,
39
39
failure : Ordering ,
40
40
) -> Result < bool , bool > {
41
- #[ cfg( not( portable_atomic_core_stronger_failure_ordering) ) ]
41
+ #[ cfg( any ( not( portable_atomic_core_stronger_failure_ordering) , miri ) ) ]
42
42
let success = crate :: utils:: upgrade_success_ordering ( success, failure) ;
43
43
self . inner . compare_exchange ( current, new, success, failure)
44
44
}
@@ -52,7 +52,7 @@ impl AtomicBool {
52
52
success : Ordering ,
53
53
failure : Ordering ,
54
54
) -> Result < bool , bool > {
55
- #[ cfg( not( portable_atomic_core_stronger_failure_ordering) ) ]
55
+ #[ cfg( any ( not( portable_atomic_core_stronger_failure_ordering) , miri ) ) ]
56
56
let success = crate :: utils:: upgrade_success_ordering ( success, failure) ;
57
57
self . inner . compare_exchange_weak ( current, new, success, failure)
58
58
}
@@ -102,7 +102,7 @@ impl<T> AtomicPtr<T> {
102
102
success : Ordering ,
103
103
failure : Ordering ,
104
104
) -> Result < * mut T , * mut T > {
105
- #[ cfg( not( portable_atomic_core_stronger_failure_ordering) ) ]
105
+ #[ cfg( any ( not( portable_atomic_core_stronger_failure_ordering) , miri ) ) ]
106
106
let success = crate :: utils:: upgrade_success_ordering ( success, failure) ;
107
107
self . inner . compare_exchange ( current, new, success, failure)
108
108
}
@@ -116,7 +116,7 @@ impl<T> AtomicPtr<T> {
116
116
success : Ordering ,
117
117
failure : Ordering ,
118
118
) -> Result < * mut T , * mut T > {
119
- #[ cfg( not( portable_atomic_core_stronger_failure_ordering) ) ]
119
+ #[ cfg( any ( not( portable_atomic_core_stronger_failure_ordering) , miri ) ) ]
120
120
let success = crate :: utils:: upgrade_success_ordering ( success, failure) ;
121
121
self . inner . compare_exchange_weak ( current, new, success, failure)
122
122
}
@@ -174,7 +174,7 @@ macro_rules! atomic_int {
174
174
success: Ordering ,
175
175
failure: Ordering ,
176
176
) -> Result <$int_type, $int_type> {
177
- #[ cfg( not( portable_atomic_core_stronger_failure_ordering) ) ]
177
+ #[ cfg( any ( not( portable_atomic_core_stronger_failure_ordering) , miri ) ) ]
178
178
let success = crate :: utils:: upgrade_success_ordering( success, failure) ;
179
179
self . inner. compare_exchange( current, new, success, failure)
180
180
}
@@ -194,7 +194,7 @@ macro_rules! atomic_int {
194
194
success: Ordering ,
195
195
failure: Ordering ,
196
196
) -> Result <$int_type, $int_type> {
197
- #[ cfg( not( portable_atomic_core_stronger_failure_ordering) ) ]
197
+ #[ cfg( any ( not( portable_atomic_core_stronger_failure_ordering) , miri ) ) ]
198
198
let success = crate :: utils:: upgrade_success_ordering( success, failure) ;
199
199
self . inner. compare_exchange_weak( current, new, success, failure)
200
200
}
0 commit comments