@@ -124,7 +124,7 @@ pub fn spin_loop_hint() {
124
124
/// [`bool`]: ../../../std/primitive.bool.html
125
125
#[ cfg( target_has_atomic = "8" ) ]
126
126
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
127
- #[ repr( align( 1 ) ) ]
127
+ #[ repr( C , align( 1 ) ) ]
128
128
pub struct AtomicBool {
129
129
v : UnsafeCell < u8 > ,
130
130
}
@@ -148,9 +148,9 @@ unsafe impl Sync for AtomicBool {}
148
148
/// This type has the same in-memory representation as a `*mut T`.
149
149
#[ cfg( target_has_atomic = "ptr" ) ]
150
150
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
151
- #[ cfg_attr( target_pointer_width = "16" , repr( align( 2 ) ) ) ]
152
- #[ cfg_attr( target_pointer_width = "32" , repr( align( 4 ) ) ) ]
153
- #[ cfg_attr( target_pointer_width = "64" , repr( align( 8 ) ) ) ]
151
+ #[ cfg_attr( target_pointer_width = "16" , repr( C , align( 2 ) ) ) ]
152
+ #[ cfg_attr( target_pointer_width = "32" , repr( C , align( 4 ) ) ) ]
153
+ #[ cfg_attr( target_pointer_width = "64" , repr( C , align( 8 ) ) ) ]
154
154
pub struct AtomicPtr < T > {
155
155
p : UnsafeCell < * mut T > ,
156
156
}
@@ -1106,7 +1106,7 @@ macro_rules! atomic_int {
1106
1106
///
1107
1107
/// [module-level documentation]: index.html
1108
1108
#[ $stable]
1109
- #[ repr( align( $align) ) ]
1109
+ #[ repr( C , align( $align) ) ]
1110
1110
pub struct $atomic_type {
1111
1111
v: UnsafeCell <$int_type>,
1112
1112
}
0 commit comments