@@ -266,6 +266,7 @@ const EMULATE_ATOMIC_BOOL: bool =
266266#[ cfg( target_has_atomic_load_store = "8" ) ]
267267#[ stable( feature = "rust1" , since = "1.0.0" ) ]
268268#[ rustc_diagnostic_item = "AtomicBool" ]
269+ #[ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ]
269270#[ repr( C , align( 1 ) ) ]
270271pub struct AtomicBool {
271272 v : UnsafeCell < u8 > ,
@@ -295,6 +296,7 @@ unsafe impl Sync for AtomicBool {}
295296#[ cfg( target_has_atomic_load_store = "ptr" ) ]
296297#[ stable( feature = "rust1" , since = "1.0.0" ) ]
297298#[ cfg_attr( not( test) , rustc_diagnostic_item = "AtomicPtr" ) ]
299+ #[ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ]
298300#[ cfg_attr( target_pointer_width = "16" , repr( C , align( 2 ) ) ) ]
299301#[ cfg_attr( target_pointer_width = "32" , repr( C , align( 4 ) ) ) ]
300302#[ cfg_attr( target_pointer_width = "64" , repr( C , align( 8 ) ) ) ]
@@ -2124,6 +2126,7 @@ macro_rules! atomic_int {
21242126 $stable_nand: meta,
21252127 $const_stable: meta,
21262128 $diagnostic_item: meta,
2129+ $interior_mut_item: meta,
21272130 $s_int_type: literal,
21282131 $extra_feature: expr,
21292132 $min_fn: ident, $max_fn: ident,
@@ -2161,6 +2164,7 @@ macro_rules! atomic_int {
21612164 /// [module-level documentation]: crate::sync::atomic
21622165 #[ $stable]
21632166 #[ $diagnostic_item]
2167+ #[ $interior_mut_item]
21642168 #[ repr( C , align( $align) ) ]
21652169 pub struct $atomic_type {
21662170 v: UnsafeCell <$int_type>,
@@ -3055,6 +3059,7 @@ atomic_int! {
30553059 stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
30563060 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
30573061 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI8" ) ,
3062+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
30583063 "i8" ,
30593064 "" ,
30603065 atomic_min, atomic_max,
@@ -3073,6 +3078,7 @@ atomic_int! {
30733078 stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
30743079 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
30753080 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU8" ) ,
3081+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
30763082 "u8" ,
30773083 "" ,
30783084 atomic_umin, atomic_umax,
@@ -3091,6 +3097,7 @@ atomic_int! {
30913097 stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
30923098 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
30933099 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI16" ) ,
3100+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
30943101 "i16" ,
30953102 "" ,
30963103 atomic_min, atomic_max,
@@ -3109,6 +3116,7 @@ atomic_int! {
31093116 stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
31103117 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
31113118 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU16" ) ,
3119+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
31123120 "u16" ,
31133121 "" ,
31143122 atomic_umin, atomic_umax,
@@ -3127,6 +3135,7 @@ atomic_int! {
31273135 stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
31283136 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
31293137 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI32" ) ,
3138+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
31303139 "i32" ,
31313140 "" ,
31323141 atomic_min, atomic_max,
@@ -3145,6 +3154,7 @@ atomic_int! {
31453154 stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
31463155 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
31473156 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU32" ) ,
3157+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
31483158 "u32" ,
31493159 "" ,
31503160 atomic_umin, atomic_umax,
@@ -3163,6 +3173,7 @@ atomic_int! {
31633173 stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
31643174 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
31653175 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI64" ) ,
3176+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
31663177 "i64" ,
31673178 "" ,
31683179 atomic_min, atomic_max,
@@ -3181,6 +3192,7 @@ atomic_int! {
31813192 stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
31823193 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
31833194 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU64" ) ,
3195+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
31843196 "u64" ,
31853197 "" ,
31863198 atomic_umin, atomic_umax,
@@ -3199,6 +3211,7 @@ atomic_int! {
31993211 unstable( feature = "integer_atomics" , issue = "99069" ) ,
32003212 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
32013213 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI128" ) ,
3214+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
32023215 "i128" ,
32033216 "#![feature(integer_atomics)]\n \n " ,
32043217 atomic_min, atomic_max,
@@ -3217,6 +3230,7 @@ atomic_int! {
32173230 unstable( feature = "integer_atomics" , issue = "99069" ) ,
32183231 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
32193232 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU128" ) ,
3233+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
32203234 "u128" ,
32213235 "#![feature(integer_atomics)]\n \n " ,
32223236 atomic_umin, atomic_umax,
@@ -3239,6 +3253,7 @@ macro_rules! atomic_int_ptr_sized {
32393253 stable( feature = "atomic_nand" , since = "1.27.0" ) ,
32403254 rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
32413255 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicIsize" ) ,
3256+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
32423257 "isize" ,
32433258 "" ,
32443259 atomic_min, atomic_max,
@@ -3257,6 +3272,7 @@ macro_rules! atomic_int_ptr_sized {
32573272 stable( feature = "atomic_nand" , since = "1.27.0" ) ,
32583273 rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
32593274 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicUsize" ) ,
3275+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
32603276 "usize" ,
32613277 "" ,
32623278 atomic_umin, atomic_umax,
0 commit comments