@@ -267,6 +267,7 @@ const EMULATE_ATOMIC_BOOL: bool =
267
267
#[ cfg( target_has_atomic_load_store = "8" ) ]
268
268
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
269
269
#[ rustc_diagnostic_item = "AtomicBool" ]
270
+ #[ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ]
270
271
#[ repr( C , align( 1 ) ) ]
271
272
pub struct AtomicBool {
272
273
v : UnsafeCell < u8 > ,
@@ -296,6 +297,7 @@ unsafe impl Sync for AtomicBool {}
296
297
#[ cfg( target_has_atomic_load_store = "ptr" ) ]
297
298
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
298
299
#[ rustc_diagnostic_item = "AtomicPtr" ]
300
+ #[ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ]
299
301
#[ cfg_attr( target_pointer_width = "16" , repr( C , align( 2 ) ) ) ]
300
302
#[ cfg_attr( target_pointer_width = "32" , repr( C , align( 4 ) ) ) ]
301
303
#[ cfg_attr( target_pointer_width = "64" , repr( C , align( 8 ) ) ) ]
@@ -2388,6 +2390,7 @@ macro_rules! atomic_int {
2388
2390
$const_stable_new: meta,
2389
2391
$const_stable_into_inner: meta,
2390
2392
$diagnostic_item: meta,
2393
+ $interior_mut_item: meta,
2391
2394
$s_int_type: literal,
2392
2395
$extra_feature: expr,
2393
2396
$min_fn: ident, $max_fn: ident,
@@ -2425,6 +2428,7 @@ macro_rules! atomic_int {
2425
2428
/// [module-level documentation]: crate::sync::atomic
2426
2429
#[ $stable]
2427
2430
#[ $diagnostic_item]
2431
+ #[ $interior_mut_item]
2428
2432
#[ repr( C , align( $align) ) ]
2429
2433
pub struct $atomic_type {
2430
2434
v: UnsafeCell <$int_type>,
@@ -3447,6 +3451,7 @@ atomic_int! {
3447
3451
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3448
3452
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3449
3453
rustc_diagnostic_item = "AtomicI8" ,
3454
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3450
3455
"i8" ,
3451
3456
"" ,
3452
3457
atomic_min, atomic_max,
@@ -3466,6 +3471,7 @@ atomic_int! {
3466
3471
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3467
3472
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3468
3473
rustc_diagnostic_item = "AtomicU8" ,
3474
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3469
3475
"u8" ,
3470
3476
"" ,
3471
3477
atomic_umin, atomic_umax,
@@ -3485,6 +3491,7 @@ atomic_int! {
3485
3491
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3486
3492
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3487
3493
rustc_diagnostic_item = "AtomicI16" ,
3494
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3488
3495
"i16" ,
3489
3496
"" ,
3490
3497
atomic_min, atomic_max,
@@ -3504,6 +3511,7 @@ atomic_int! {
3504
3511
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3505
3512
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3506
3513
rustc_diagnostic_item = "AtomicU16" ,
3514
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3507
3515
"u16" ,
3508
3516
"" ,
3509
3517
atomic_umin, atomic_umax,
@@ -3523,6 +3531,7 @@ atomic_int! {
3523
3531
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3524
3532
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3525
3533
rustc_diagnostic_item = "AtomicI32" ,
3534
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3526
3535
"i32" ,
3527
3536
"" ,
3528
3537
atomic_min, atomic_max,
@@ -3542,6 +3551,7 @@ atomic_int! {
3542
3551
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3543
3552
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3544
3553
rustc_diagnostic_item = "AtomicU32" ,
3554
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3545
3555
"u32" ,
3546
3556
"" ,
3547
3557
atomic_umin, atomic_umax,
@@ -3561,6 +3571,7 @@ atomic_int! {
3561
3571
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3562
3572
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3563
3573
rustc_diagnostic_item = "AtomicI64" ,
3574
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3564
3575
"i64" ,
3565
3576
"" ,
3566
3577
atomic_min, atomic_max,
@@ -3580,6 +3591,7 @@ atomic_int! {
3580
3591
rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
3581
3592
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3582
3593
rustc_diagnostic_item = "AtomicU64" ,
3594
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3583
3595
"u64" ,
3584
3596
"" ,
3585
3597
atomic_umin, atomic_umax,
@@ -3599,6 +3611,7 @@ atomic_int! {
3599
3611
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3600
3612
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3601
3613
rustc_diagnostic_item = "AtomicI128" ,
3614
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3602
3615
"i128" ,
3603
3616
"#![feature(integer_atomics)]\n \n " ,
3604
3617
atomic_min, atomic_max,
@@ -3618,6 +3631,7 @@ atomic_int! {
3618
3631
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3619
3632
rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
3620
3633
rustc_diagnostic_item = "AtomicU128" ,
3634
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3621
3635
"u128" ,
3622
3636
"#![feature(integer_atomics)]\n \n " ,
3623
3637
atomic_umin, atomic_umax,
@@ -3641,6 +3655,7 @@ macro_rules! atomic_int_ptr_sized {
3641
3655
rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
3642
3656
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3643
3657
rustc_diagnostic_item = "AtomicIsize" ,
3658
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3644
3659
"isize" ,
3645
3660
"" ,
3646
3661
atomic_min, atomic_max,
@@ -3660,6 +3675,7 @@ macro_rules! atomic_int_ptr_sized {
3660
3675
rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
3661
3676
rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
3662
3677
rustc_diagnostic_item = "AtomicUsize" ,
3678
+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
3663
3679
"usize" ,
3664
3680
"" ,
3665
3681
atomic_umin, atomic_umax,
0 commit comments