@@ -361,6 +361,7 @@ const EMULATE_ATOMIC_BOOL: bool =
361361#[ cfg( target_has_atomic_load_store = "8" ) ]
362362#[ stable( feature = "rust1" , since = "1.0.0" ) ]
363363#[ rustc_diagnostic_item = "AtomicBool" ]
364+ #[ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ]
364365#[ repr( C , align( 1 ) ) ]
365366pub struct AtomicBool {
366367 v : UnsafeCell < u8 > ,
@@ -390,6 +391,7 @@ unsafe impl Sync for AtomicBool {}
390391#[ cfg( target_has_atomic_load_store = "ptr" ) ]
391392#[ stable( feature = "rust1" , since = "1.0.0" ) ]
392393#[ rustc_diagnostic_item = "AtomicPtr" ]
394+ #[ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ]
393395#[ cfg_attr( target_pointer_width = "16" , repr( C , align( 2 ) ) ) ]
394396#[ cfg_attr( target_pointer_width = "32" , repr( C , align( 4 ) ) ) ]
395397#[ cfg_attr( target_pointer_width = "64" , repr( C , align( 8 ) ) ) ]
@@ -2484,6 +2486,7 @@ macro_rules! atomic_int {
24842486 $const_stable_new: meta,
24852487 $const_stable_into_inner: meta,
24862488 $diagnostic_item: meta,
2489+ $interior_mut_item: meta,
24872490 $s_int_type: literal,
24882491 $extra_feature: expr,
24892492 $min_fn: ident, $max_fn: ident,
@@ -2521,6 +2524,7 @@ macro_rules! atomic_int {
25212524 /// [module-level documentation]: crate::sync::atomic
25222525 #[ $stable]
25232526 #[ $diagnostic_item]
2527+ #[ $interior_mut_item]
25242528 #[ repr( C , align( $align) ) ]
25252529 pub struct $atomic_type {
25262530 v: UnsafeCell <$int_type>,
@@ -3544,6 +3548,7 @@ atomic_int! {
35443548 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
35453549 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
35463550 rustc_diagnostic_item = "AtomicI8" ,
3551+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
35473552 "i8" ,
35483553 "" ,
35493554 atomic_min, atomic_max,
@@ -3563,6 +3568,7 @@ atomic_int! {
35633568 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
35643569 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
35653570 rustc_diagnostic_item = "AtomicU8" ,
3571+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
35663572 "u8" ,
35673573 "" ,
35683574 atomic_umin, atomic_umax,
@@ -3582,6 +3588,7 @@ atomic_int! {
35823588 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
35833589 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
35843590 rustc_diagnostic_item = "AtomicI16" ,
3591+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
35853592 "i16" ,
35863593 "" ,
35873594 atomic_min, atomic_max,
@@ -3601,6 +3608,7 @@ atomic_int! {
36013608 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
36023609 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
36033610 rustc_diagnostic_item = "AtomicU16" ,
3611+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
36043612 "u16" ,
36053613 "" ,
36063614 atomic_umin, atomic_umax,
@@ -3620,6 +3628,7 @@ atomic_int! {
36203628 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
36213629 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
36223630 rustc_diagnostic_item = "AtomicI32" ,
3631+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
36233632 "i32" ,
36243633 "" ,
36253634 atomic_min, atomic_max,
@@ -3639,6 +3648,7 @@ atomic_int! {
36393648 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
36403649 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
36413650 rustc_diagnostic_item = "AtomicU32" ,
3651+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
36423652 "u32" ,
36433653 "" ,
36443654 atomic_umin, atomic_umax,
@@ -3658,6 +3668,7 @@ atomic_int! {
36583668 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
36593669 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
36603670 rustc_diagnostic_item = "AtomicI64" ,
3671+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
36613672 "i64" ,
36623673 "" ,
36633674 atomic_min, atomic_max,
@@ -3677,6 +3688,7 @@ atomic_int! {
36773688 rustc_const_stable( feature = "const_integer_atomics" , since = "1.34.0" ) ,
36783689 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
36793690 rustc_diagnostic_item = "AtomicU64" ,
3691+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
36803692 "u64" ,
36813693 "" ,
36823694 atomic_umin, atomic_umax,
@@ -3696,6 +3708,7 @@ atomic_int! {
36963708 rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
36973709 rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
36983710 rustc_diagnostic_item = "AtomicI128" ,
3711+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
36993712 "i128" ,
37003713 "#![feature(integer_atomics)]\n \n " ,
37013714 atomic_min, atomic_max,
@@ -3715,6 +3728,7 @@ atomic_int! {
37153728 rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
37163729 rustc_const_unstable( feature = "integer_atomics" , issue = "99069" ) ,
37173730 rustc_diagnostic_item = "AtomicU128" ,
3731+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
37183732 "u128" ,
37193733 "#![feature(integer_atomics)]\n \n " ,
37203734 atomic_umin, atomic_umax,
@@ -3738,6 +3752,7 @@ macro_rules! atomic_int_ptr_sized {
37383752 rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
37393753 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
37403754 rustc_diagnostic_item = "AtomicIsize" ,
3755+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
37413756 "isize" ,
37423757 "" ,
37433758 atomic_min, atomic_max,
@@ -3757,6 +3772,7 @@ macro_rules! atomic_int_ptr_sized {
37573772 rustc_const_stable( feature = "const_ptr_sized_atomics" , since = "1.24.0" ) ,
37583773 rustc_const_stable( feature = "const_atomic_into_inner" , since = "1.79.0" ) ,
37593774 rustc_diagnostic_item = "AtomicUsize" ,
3775+ cfg_attr( not( bootstrap) , rustc_significant_interior_mutable_type) ,
37603776 "usize" ,
37613777 "" ,
37623778 atomic_umin, atomic_umax,
0 commit comments