@@ -88,13 +88,13 @@ use default::Default;
88
88
use fmt;
89
89
90
90
/// A boolean type which can be safely shared between threads.
91
- #[ cfg( any ( stage0 , target_has_atomic = "8" ) ) ]
91
+ #[ cfg( target_has_atomic = "8" ) ]
92
92
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
93
93
pub struct AtomicBool {
94
94
v : UnsafeCell < u8 > ,
95
95
}
96
96
97
- #[ cfg( any ( stage0 , target_has_atomic = "8" ) ) ]
97
+ #[ cfg( target_has_atomic = "8" ) ]
98
98
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
99
99
impl Default for AtomicBool {
100
100
fn default ( ) -> Self {
@@ -103,29 +103,29 @@ impl Default for AtomicBool {
103
103
}
104
104
105
105
// Send is implicitly implemented for AtomicBool.
106
- #[ cfg( any ( stage0 , target_has_atomic = "8" ) ) ]
106
+ #[ cfg( target_has_atomic = "8" ) ]
107
107
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
108
108
unsafe impl Sync for AtomicBool { }
109
109
110
110
/// A raw pointer type which can be safely shared between threads.
111
- #[ cfg( any ( stage0 , target_has_atomic = "ptr" ) ) ]
111
+ #[ cfg( target_has_atomic = "ptr" ) ]
112
112
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
113
113
pub struct AtomicPtr < T > {
114
114
p : UnsafeCell < * mut T > ,
115
115
}
116
116
117
- #[ cfg( any ( stage0 , target_has_atomic = "ptr" ) ) ]
117
+ #[ cfg( target_has_atomic = "ptr" ) ]
118
118
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
119
119
impl < T > Default for AtomicPtr < T > {
120
120
fn default ( ) -> AtomicPtr < T > {
121
121
AtomicPtr :: new ( :: ptr:: null_mut ( ) )
122
122
}
123
123
}
124
124
125
- #[ cfg( any ( stage0 , target_has_atomic = "ptr" ) ) ]
125
+ #[ cfg( target_has_atomic = "ptr" ) ]
126
126
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
127
127
unsafe impl < T > Send for AtomicPtr < T > { }
128
- #[ cfg( any ( stage0 , target_has_atomic = "ptr" ) ) ]
128
+ #[ cfg( target_has_atomic = "ptr" ) ]
129
129
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
130
130
unsafe impl < T > Sync for AtomicPtr < T > { }
131
131
@@ -167,11 +167,11 @@ pub enum Ordering {
167
167
}
168
168
169
169
/// An `AtomicBool` initialized to `false`.
170
- #[ cfg( any ( stage0 , target_has_atomic = "8" ) ) ]
170
+ #[ cfg( target_has_atomic = "8" ) ]
171
171
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
172
172
pub const ATOMIC_BOOL_INIT : AtomicBool = AtomicBool :: new ( false ) ;
173
173
174
- #[ cfg( any ( stage0 , target_has_atomic = "8" ) ) ]
174
+ #[ cfg( target_has_atomic = "8" ) ]
175
175
impl AtomicBool {
176
176
/// Creates a new `AtomicBool`.
177
177
///
@@ -508,7 +508,7 @@ impl AtomicBool {
508
508
}
509
509
}
510
510
511
- #[ cfg( any ( stage0 , target_has_atomic = "ptr" ) ) ]
511
+ #[ cfg( target_has_atomic = "ptr" ) ]
512
512
impl < T > AtomicPtr < T > {
513
513
/// Creates a new `AtomicPtr`.
514
514
///
@@ -1106,14 +1106,14 @@ atomic_int! {
1106
1106
unstable( feature = "integer_atomics" , issue = "32976" ) ,
1107
1107
u64 AtomicU64 ATOMIC_U64_INIT
1108
1108
}
1109
- #[ cfg( any ( stage0 , target_has_atomic = "ptr" ) ) ]
1109
+ #[ cfg( target_has_atomic = "ptr" ) ]
1110
1110
atomic_int ! {
1111
1111
stable( feature = "rust1" , since = "1.0.0" ) ,
1112
1112
stable( feature = "extended_compare_and_swap" , since = "1.10.0" ) ,
1113
1113
stable( feature = "atomic_debug" , since = "1.3.0" ) ,
1114
1114
isize AtomicIsize ATOMIC_ISIZE_INIT
1115
1115
}
1116
- #[ cfg( any ( stage0 , target_has_atomic = "ptr" ) ) ]
1116
+ #[ cfg( target_has_atomic = "ptr" ) ]
1117
1117
atomic_int ! {
1118
1118
stable( feature = "rust1" , since = "1.0.0" ) ,
1119
1119
stable( feature = "extended_compare_and_swap" , since = "1.10.0" ) ,
@@ -1311,15 +1311,15 @@ pub fn fence(order: Ordering) {
1311
1311
}
1312
1312
1313
1313
1314
- #[ cfg( any ( stage0 , target_has_atomic = "8" ) ) ]
1314
+ #[ cfg( target_has_atomic = "8" ) ]
1315
1315
#[ stable( feature = "atomic_debug" , since = "1.3.0" ) ]
1316
1316
impl fmt:: Debug for AtomicBool {
1317
1317
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
1318
1318
f. debug_tuple ( "AtomicBool" ) . field ( & self . load ( Ordering :: SeqCst ) ) . finish ( )
1319
1319
}
1320
1320
}
1321
1321
1322
- #[ cfg( any ( stage0 , target_has_atomic = "ptr" ) ) ]
1322
+ #[ cfg( target_has_atomic = "ptr" ) ]
1323
1323
#[ stable( feature = "atomic_debug" , since = "1.3.0" ) ]
1324
1324
impl < T > fmt:: Debug for AtomicPtr < T > {
1325
1325
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
0 commit comments