@@ -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 ) ) ) ]
@@ -2125,6 +2127,7 @@ macro_rules! atomic_int {
21252127 $const_stable_new: meta,
21262128 $const_stable_into_inner: meta,
21272129 $diagnostic_item: meta,
2130+ $interior_mut_item: meta,
21282131 $s_int_type: literal,
21292132 $extra_feature: expr,
21302133 $min_fn: ident, $max_fn: ident,
@@ -2162,6 +2165,7 @@ macro_rules! atomic_int {
21622165 /// [module-level documentation]: crate::sync::atomic
21632166 #[ $stable]
21642167 #[ $diagnostic_item]
2168+ #[ $interior_mut_item]
21652169 #[ repr( C , align( $align) ) ]
21662170 pub struct $atomic_type {
21672171 v: UnsafeCell <$int_type>,
@@ -3057,6 +3061,7 @@ atomic_int! {
30573061 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
30583062 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
30593063 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI8" ) ,
3064+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
30603065 "i8" ,
30613066 "" ,
30623067 atomic_min, atomic_max,
@@ -3076,6 +3081,7 @@ atomic_int! {
30763081 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
30773082 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
30783083 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU8" ) ,
3084+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
30793085 "u8" ,
30803086 "" ,
30813087 atomic_umin, atomic_umax,
@@ -3095,6 +3101,7 @@ atomic_int! {
30953101 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
30963102 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
30973103 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI16" ) ,
3104+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
30983105 "i16" ,
30993106 "" ,
31003107 atomic_min, atomic_max,
@@ -3114,6 +3121,7 @@ atomic_int! {
31143121 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
31153122 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
31163123 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU16" ) ,
3124+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
31173125 "u16" ,
31183126 "" ,
31193127 atomic_umin, atomic_umax,
@@ -3133,6 +3141,7 @@ atomic_int! {
31333141 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
31343142 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
31353143 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI32" ) ,
3144+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
31363145 "i32" ,
31373146 "" ,
31383147 atomic_min, atomic_max,
@@ -3152,6 +3161,7 @@ atomic_int! {
31523161 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
31533162 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
31543163 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU32" ) ,
3164+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
31553165 "u32" ,
31563166 "" ,
31573167 atomic_umin, atomic_umax,
@@ -3171,6 +3181,7 @@ atomic_int! {
31713181 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
31723182 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
31733183 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI64" ) ,
3184+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
31743185 "i64" ,
31753186 "" ,
31763187 atomic_min, atomic_max,
@@ -3190,6 +3201,7 @@ atomic_int! {
31903201 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
31913202 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
31923203 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU64" ) ,
3204+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
31933205 "u64" ,
31943206 "" ,
31953207 atomic_umin, atomic_umax,
@@ -3209,6 +3221,7 @@ atomic_int! {
32093221 rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
32103222 rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
32113223 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI128" ) ,
3224+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
32123225 "i128" ,
32133226 "#![feature(integer_atomics)]\n \n " ,
32143227 atomic_min, atomic_max,
@@ -3228,6 +3241,7 @@ atomic_int! {
32283241 rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
32293242 rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
32303243 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU128" ) ,
3244+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
32313245 "u128" ,
32323246 "#![feature(integer_atomics)]\n \n " ,
32333247 atomic_umin, atomic_umax,
@@ -3251,6 +3265,7 @@ macro_rules! atomic_int_ptr_sized {
32513265 rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
32523266 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
32533267 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicIsize" ) ,
3268+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
32543269 "isize" ,
32553270 "" ,
32563271 atomic_min, atomic_max,
@@ -3270,6 +3285,7 @@ macro_rules! atomic_int_ptr_sized {
32703285 rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
32713286 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
32723287 cfg_attr( not( test) , rustc_diagnostic_item = "AtomicUsize" ) ,
3288+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
32733289 "usize" ,
32743290 "" ,
32753291 atomic_umin, atomic_umax,
0 commit comments