@@ -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 ) ) ) ]
@@ -2125,6 +2127,7 @@ macro_rules! atomic_int {
2125
2127
$const_stable_new: meta,
2126
2128
$const_stable_into_inner: meta,
2127
2129
$diagnostic_item: meta,
2130
+ $interior_mut_item: meta,
2128
2131
$s_int_type: literal,
2129
2132
$extra_feature: expr,
2130
2133
$min_fn: ident, $max_fn: ident,
@@ -2162,6 +2165,7 @@ macro_rules! atomic_int {
2162
2165
/// [module-level documentation]: crate::sync::atomic
2163
2166
#[ $stable]
2164
2167
#[ $diagnostic_item]
2168
+ #[ $interior_mut_item]
2165
2169
#[ repr( C , align( $align) ) ]
2166
2170
pub struct $atomic_type {
2167
2171
v: UnsafeCell <$int_type>,
@@ -3057,6 +3061,7 @@ atomic_int! {
3057
3061
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3058
3062
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3059
3063
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI8" ) ,
3064
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3060
3065
"i8" ,
3061
3066
"" ,
3062
3067
atomic_min, atomic_max,
@@ -3076,6 +3081,7 @@ atomic_int! {
3076
3081
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3077
3082
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3078
3083
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU8" ) ,
3084
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3079
3085
"u8" ,
3080
3086
"" ,
3081
3087
atomic_umin, atomic_umax,
@@ -3095,6 +3101,7 @@ atomic_int! {
3095
3101
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3096
3102
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3097
3103
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI16" ) ,
3104
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3098
3105
"i16" ,
3099
3106
"" ,
3100
3107
atomic_min, atomic_max,
@@ -3114,6 +3121,7 @@ atomic_int! {
3114
3121
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3115
3122
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3116
3123
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU16" ) ,
3124
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3117
3125
"u16" ,
3118
3126
"" ,
3119
3127
atomic_umin, atomic_umax,
@@ -3133,6 +3141,7 @@ atomic_int! {
3133
3141
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3134
3142
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3135
3143
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI32" ) ,
3144
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3136
3145
"i32" ,
3137
3146
"" ,
3138
3147
atomic_min, atomic_max,
@@ -3152,6 +3161,7 @@ atomic_int! {
3152
3161
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3153
3162
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3154
3163
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU32" ) ,
3164
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3155
3165
"u32" ,
3156
3166
"" ,
3157
3167
atomic_umin, atomic_umax,
@@ -3171,6 +3181,7 @@ atomic_int! {
3171
3181
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3172
3182
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3173
3183
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI64" ) ,
3184
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3174
3185
"i64" ,
3175
3186
"" ,
3176
3187
atomic_min, atomic_max,
@@ -3190,6 +3201,7 @@ atomic_int! {
3190
3201
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3191
3202
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3192
3203
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU64" ) ,
3204
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3193
3205
"u64" ,
3194
3206
"" ,
3195
3207
atomic_umin, atomic_umax,
@@ -3209,6 +3221,7 @@ atomic_int! {
3209
3221
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3210
3222
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3211
3223
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI128" ) ,
3224
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3212
3225
"i128" ,
3213
3226
"#![feature(integer_atomics)]\n \n " ,
3214
3227
atomic_min, atomic_max,
@@ -3228,6 +3241,7 @@ atomic_int! {
3228
3241
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3229
3242
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3230
3243
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU128" ) ,
3244
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3231
3245
"u128" ,
3232
3246
"#![feature(integer_atomics)]\n \n " ,
3233
3247
atomic_umin, atomic_umax,
@@ -3251,6 +3265,7 @@ macro_rules! atomic_int_ptr_sized {
3251
3265
rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
3252
3266
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3253
3267
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicIsize" ) ,
3268
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3254
3269
"isize" ,
3255
3270
"" ,
3256
3271
atomic_min, atomic_max,
@@ -3270,6 +3285,7 @@ macro_rules! atomic_int_ptr_sized {
3270
3285
rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
3271
3286
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3272
3287
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicUsize" ) ,
3288
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3273
3289
"usize" ,
3274
3290
"" ,
3275
3291
atomic_umin, atomic_umax,
0 commit comments