@@ -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 ) ) ) ]
@@ -2387,6 +2389,7 @@ macro_rules! atomic_int {
2387
2389
$const_stable_new: meta,
2388
2390
$const_stable_into_inner: meta,
2389
2391
$diagnostic_item: meta,
2392
+ $interior_mut_item: meta,
2390
2393
$s_int_type: literal,
2391
2394
$extra_feature: expr,
2392
2395
$min_fn: ident, $max_fn: ident,
@@ -2424,6 +2427,7 @@ macro_rules! atomic_int {
2424
2427
/// [module-level documentation]: crate::sync::atomic
2425
2428
#[ $stable]
2426
2429
#[ $diagnostic_item]
2430
+ #[ $interior_mut_item]
2427
2431
#[ repr( C , align( $align) ) ]
2428
2432
pub struct $atomic_type {
2429
2433
v: UnsafeCell <$int_type>,
@@ -3446,6 +3450,7 @@ atomic_int! {
3446
3450
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3447
3451
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3448
3452
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI8" ) ,
3453
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3449
3454
"i8" ,
3450
3455
"" ,
3451
3456
atomic_min, atomic_max,
@@ -3465,6 +3470,7 @@ atomic_int! {
3465
3470
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3466
3471
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3467
3472
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU8" ) ,
3473
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3468
3474
"u8" ,
3469
3475
"" ,
3470
3476
atomic_umin, atomic_umax,
@@ -3484,6 +3490,7 @@ atomic_int! {
3484
3490
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3485
3491
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3486
3492
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI16" ) ,
3493
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3487
3494
"i16" ,
3488
3495
"" ,
3489
3496
atomic_min, atomic_max,
@@ -3503,6 +3510,7 @@ atomic_int! {
3503
3510
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3504
3511
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3505
3512
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU16" ) ,
3513
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3506
3514
"u16" ,
3507
3515
"" ,
3508
3516
atomic_umin, atomic_umax,
@@ -3522,6 +3530,7 @@ atomic_int! {
3522
3530
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3523
3531
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3524
3532
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI32" ) ,
3533
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3525
3534
"i32" ,
3526
3535
"" ,
3527
3536
atomic_min, atomic_max,
@@ -3541,6 +3550,7 @@ atomic_int! {
3541
3550
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3542
3551
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3543
3552
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU32" ) ,
3553
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3544
3554
"u32" ,
3545
3555
"" ,
3546
3556
atomic_umin, atomic_umax,
@@ -3560,6 +3570,7 @@ atomic_int! {
3560
3570
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3561
3571
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3562
3572
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI64" ) ,
3573
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3563
3574
"i64" ,
3564
3575
"" ,
3565
3576
atomic_min, atomic_max,
@@ -3579,6 +3590,7 @@ atomic_int! {
3579
3590
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3580
3591
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3581
3592
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU64" ) ,
3593
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3582
3594
"u64" ,
3583
3595
"" ,
3584
3596
atomic_umin, atomic_umax,
@@ -3598,6 +3610,7 @@ atomic_int! {
3598
3610
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3599
3611
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3600
3612
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicI128" ) ,
3613
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3601
3614
"i128" ,
3602
3615
"#![feature(integer_atomics)]\n \n " ,
3603
3616
atomic_min, atomic_max,
@@ -3617,6 +3630,7 @@ atomic_int! {
3617
3630
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3618
3631
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3619
3632
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicU128" ) ,
3633
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3620
3634
"u128" ,
3621
3635
"#![feature(integer_atomics)]\n \n " ,
3622
3636
atomic_umin, atomic_umax,
@@ -3640,6 +3654,7 @@ macro_rules! atomic_int_ptr_sized {
3640
3654
rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
3641
3655
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3642
3656
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicIsize" ) ,
3657
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3643
3658
"isize" ,
3644
3659
"" ,
3645
3660
atomic_min, atomic_max,
@@ -3659,6 +3674,7 @@ macro_rules! atomic_int_ptr_sized {
3659
3674
rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
3660
3675
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3661
3676
cfg_attr( not( test) , rustc_diagnostic_item = "AtomicUsize" ) ,
3677
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3662
3678
"usize" ,
3663
3679
"" ,
3664
3680
atomic_umin, atomic_umax,
0 commit comments