@@ -361,6 +361,7 @@ const EMULATE_ATOMIC_BOOL: bool =
361
361
#[ cfg( target_has_atomic_load_store = "8" ) ]
362
362
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
363
363
#[ rustc_diagnostic_item = "AtomicBool" ]
364
+ #[ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ]
364
365
#[ repr( C , align( 1 ) ) ]
365
366
pub struct AtomicBool {
366
367
v : UnsafeCell < u8 > ,
@@ -390,6 +391,7 @@ unsafe impl Sync for AtomicBool {}
390
391
#[ cfg( target_has_atomic_load_store = "ptr" ) ]
391
392
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
392
393
#[ rustc_diagnostic_item = "AtomicPtr" ]
394
+ #[ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ]
393
395
#[ cfg_attr( target_pointer_width = "16" , repr( C , align( 2 ) ) ) ]
394
396
#[ cfg_attr( target_pointer_width = "32" , repr( C , align( 4 ) ) ) ]
395
397
#[ cfg_attr( target_pointer_width = "64" , repr( C , align( 8 ) ) ) ]
@@ -2484,6 +2486,7 @@ macro_rules! atomic_int {
2484
2486
$const_stable_new: meta,
2485
2487
$const_stable_into_inner: meta,
2486
2488
$diagnostic_item: meta,
2489
+ $interior_mut_item: meta,
2487
2490
$s_int_type: literal,
2488
2491
$extra_feature: expr,
2489
2492
$min_fn: ident, $max_fn: ident,
@@ -2521,6 +2524,7 @@ macro_rules! atomic_int {
2521
2524
/// [module-level documentation]: crate::sync::atomic
2522
2525
#[ $stable]
2523
2526
#[ $diagnostic_item]
2527
+ #[ $interior_mut_item]
2524
2528
#[ repr( C , align( $align) ) ]
2525
2529
pub struct $atomic_type {
2526
2530
v: UnsafeCell <$int_type>,
@@ -3544,6 +3548,7 @@ atomic_int! {
3544
3548
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3545
3549
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3546
3550
rustc_diagnostic_item = "AtomicI8" ,
3551
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3547
3552
"i8" ,
3548
3553
"" ,
3549
3554
atomic_min, atomic_max,
@@ -3563,6 +3568,7 @@ atomic_int! {
3563
3568
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3564
3569
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3565
3570
rustc_diagnostic_item = "AtomicU8" ,
3571
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3566
3572
"u8" ,
3567
3573
"" ,
3568
3574
atomic_umin, atomic_umax,
@@ -3582,6 +3588,7 @@ atomic_int! {
3582
3588
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3583
3589
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3584
3590
rustc_diagnostic_item = "AtomicI16" ,
3591
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3585
3592
"i16" ,
3586
3593
"" ,
3587
3594
atomic_min, atomic_max,
@@ -3601,6 +3608,7 @@ atomic_int! {
3601
3608
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3602
3609
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3603
3610
rustc_diagnostic_item = "AtomicU16" ,
3611
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3604
3612
"u16" ,
3605
3613
"" ,
3606
3614
atomic_umin, atomic_umax,
@@ -3620,6 +3628,7 @@ atomic_int! {
3620
3628
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3621
3629
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3622
3630
rustc_diagnostic_item = "AtomicI32" ,
3631
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3623
3632
"i32" ,
3624
3633
"" ,
3625
3634
atomic_min, atomic_max,
@@ -3639,6 +3648,7 @@ atomic_int! {
3639
3648
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3640
3649
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3641
3650
rustc_diagnostic_item = "AtomicU32" ,
3651
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3642
3652
"u32" ,
3643
3653
"" ,
3644
3654
atomic_umin, atomic_umax,
@@ -3658,6 +3668,7 @@ atomic_int! {
3658
3668
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3659
3669
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3660
3670
rustc_diagnostic_item = "AtomicI64" ,
3671
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3661
3672
"i64" ,
3662
3673
"" ,
3663
3674
atomic_min, atomic_max,
@@ -3677,6 +3688,7 @@ atomic_int! {
3677
3688
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3678
3689
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3679
3690
rustc_diagnostic_item = "AtomicU64" ,
3691
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3680
3692
"u64" ,
3681
3693
"" ,
3682
3694
atomic_umin, atomic_umax,
@@ -3696,6 +3708,7 @@ atomic_int! {
3696
3708
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3697
3709
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3698
3710
rustc_diagnostic_item = "AtomicI128" ,
3711
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3699
3712
"i128" ,
3700
3713
"#![feature(integer_atomics)]\n \n " ,
3701
3714
atomic_min, atomic_max,
@@ -3715,6 +3728,7 @@ atomic_int! {
3715
3728
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3716
3729
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3717
3730
rustc_diagnostic_item = "AtomicU128" ,
3731
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3718
3732
"u128" ,
3719
3733
"#![feature(integer_atomics)]\n \n " ,
3720
3734
atomic_umin, atomic_umax,
@@ -3738,6 +3752,7 @@ macro_rules! atomic_int_ptr_sized {
3738
3752
rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
3739
3753
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3740
3754
rustc_diagnostic_item = "AtomicIsize" ,
3755
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3741
3756
"isize" ,
3742
3757
"" ,
3743
3758
atomic_min, atomic_max,
@@ -3757,6 +3772,7 @@ macro_rules! atomic_int_ptr_sized {
3757
3772
rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
3758
3773
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3759
3774
rustc_diagnostic_item = "AtomicUsize" ,
3775
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3760
3776
"usize" ,
3761
3777
"" ,
3762
3778
atomic_umin, atomic_umax,
0 commit comments