@@ -266,6 +266,7 @@ const EMULATE_ATOMIC_BOOL: bool =
266
266
#[ cfg( target_has_atomic_load_store = "8" ) ]
267
267
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
268
268
#[ rustc_diagnostic_item = "AtomicBool" ]
269
+ #[ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ]
269
270
#[ repr( C , align( 1 ) ) ]
270
271
pub struct AtomicBool {
271
272
v : UnsafeCell < u8 > ,
@@ -295,6 +296,7 @@ unsafe impl Sync for AtomicBool {}
295
296
#[ cfg( target_has_atomic_load_store = "ptr" ) ]
296
297
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
297
298
#[ cfg_attr( not( test) , rustc_diagnostic_item = "AtomicPtr" ) ]
299
+ #[ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ]
298
300
#[ cfg_attr( target_pointer_width = "16" , repr( C , align( 2 ) ) ) ]
299
301
#[ cfg_attr( target_pointer_width = "32" , repr( C , align( 4 ) ) ) ]
300
302
#[ cfg_attr( target_pointer_width = "64" , repr( C , align( 8 ) ) ) ]
@@ -2124,6 +2126,7 @@ macro_rules! atomic_int {
2124
2126
$stable_nand: meta,
2125
2127
$const_stable: meta,
2126
2128
$diagnostic_item: meta,
2129
+ $interior_mut_item: meta,
2127
2130
$s_int_type: literal,
2128
2131
$extra_feature: expr,
2129
2132
$min_fn: ident, $max_fn: ident,
@@ -2161,6 +2164,7 @@ macro_rules! atomic_int {
2161
2164
/// [module-level documentation]: crate::sync::atomic
2162
2165
#[ $stable]
2163
2166
#[ $diagnostic_item]
2167
+ #[ $interior_mut_item]
2164
2168
#[ repr( C , align( $align) ) ]
2165
2169
pub struct $atomic_type {
2166
2170
v: UnsafeCell <$int_type>,
@@ -3055,6 +3059,7 @@ atomic_int! {
3055
3059
stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
3056
3060
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3057
3061
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI8" ) ,
3062
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3058
3063
"i8" ,
3059
3064
"" ,
3060
3065
atomic_min, atomic_max,
@@ -3073,6 +3078,7 @@ atomic_int! {
3073
3078
stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
3074
3079
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3075
3080
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU8" ) ,
3081
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3076
3082
"u8" ,
3077
3083
"" ,
3078
3084
atomic_umin, atomic_umax,
@@ -3091,6 +3097,7 @@ atomic_int! {
3091
3097
stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
3092
3098
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3093
3099
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI16" ) ,
3100
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3094
3101
"i16" ,
3095
3102
"" ,
3096
3103
atomic_min, atomic_max,
@@ -3109,6 +3116,7 @@ atomic_int! {
3109
3116
stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
3110
3117
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3111
3118
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU16" ) ,
3119
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3112
3120
"u16" ,
3113
3121
"" ,
3114
3122
atomic_umin, atomic_umax,
@@ -3127,6 +3135,7 @@ atomic_int! {
3127
3135
stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
3128
3136
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3129
3137
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI32" ) ,
3138
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3130
3139
"i32" ,
3131
3140
"" ,
3132
3141
atomic_min, atomic_max,
@@ -3145,6 +3154,7 @@ atomic_int! {
3145
3154
stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
3146
3155
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3147
3156
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU32" ) ,
3157
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3148
3158
"u32" ,
3149
3159
"" ,
3150
3160
atomic_umin, atomic_umax,
@@ -3163,6 +3173,7 @@ atomic_int! {
3163
3173
stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
3164
3174
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3165
3175
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI64" ) ,
3176
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3166
3177
"i64" ,
3167
3178
"" ,
3168
3179
atomic_min, atomic_max,
@@ -3181,6 +3192,7 @@ atomic_int! {
3181
3192
stable( feature = "integer_atomics_stable" , since = "1.34.0" ) ,
3182
3193
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3183
3194
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU64" ) ,
3195
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3184
3196
"u64" ,
3185
3197
"" ,
3186
3198
atomic_umin, atomic_umax,
@@ -3199,6 +3211,7 @@ atomic_int! {
3199
3211
unstable( feature = "integer_atomics" , issue = "99069" ) ,
3200
3212
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3201
3213
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI128" ) ,
3214
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3202
3215
"i128" ,
3203
3216
"#![feature(integer_atomics)]\n \n " ,
3204
3217
atomic_min, atomic_max,
@@ -3217,6 +3230,7 @@ atomic_int! {
3217
3230
unstable( feature = "integer_atomics" , issue = "99069" ) ,
3218
3231
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3219
3232
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU128" ) ,
3233
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3220
3234
"u128" ,
3221
3235
"#![feature(integer_atomics)]\n \n " ,
3222
3236
atomic_umin, atomic_umax,
@@ -3239,6 +3253,7 @@ macro_rules! atomic_int_ptr_sized {
3239
3253
stable( feature = "atomic_nand" , since = "1.27.0" ) ,
3240
3254
rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
3241
3255
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicIsize" ) ,
3256
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3242
3257
"isize" ,
3243
3258
"" ,
3244
3259
atomic_min, atomic_max,
@@ -3257,6 +3272,7 @@ macro_rules! atomic_int_ptr_sized {
3257
3272
stable( feature = "atomic_nand" , since = "1.27.0" ) ,
3258
3273
rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
3259
3274
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicUsize" ) ,
3275
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3260
3276
"usize" ,
3261
3277
"" ,
3262
3278
atomic_umin, atomic_umax,
0 commit comments