@@ -1161,7 +1161,7 @@ macro_rules! int_impl {
11611161 ) ]
11621162 #[ must_use = "this returns the result of the operation, \
11631163 without modifying the original"]
1164- #[ rustc_const_unstable( feature = "unchecked_neg" , issue = "85122" ) ]
1164+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "unchecked_neg" , issue = "85122" ) ) ]
11651165 #[ inline( always) ]
11661166 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
11671167 pub const unsafe fn unchecked_neg( self ) -> Self {
@@ -1227,8 +1227,7 @@ macro_rules! int_impl {
12271227 /// ```
12281228 #[ stable( feature = "wrapping" , since = "1.7.0" ) ]
12291229 #[ rustc_const_stable( feature = "const_checked_int_methods" , since = "1.47.0" ) ]
1230- // We could always go back to wrapping
1231- #[ rustc_allow_const_fn_unstable( unchecked_shifts) ]
1230+ #[ cfg_attr( bootstrap, rustc_allow_const_fn_unstable( unchecked_shifts) ) ]
12321231 #[ must_use = "this returns the result of the operation, \
12331232 without modifying the original"]
12341233 #[ inline]
@@ -1294,7 +1293,7 @@ macro_rules! int_impl {
12941293 ) ]
12951294 #[ must_use = "this returns the result of the operation, \
12961295 without modifying the original"]
1297- #[ rustc_const_unstable( feature = "unchecked_shifts" , issue = "85122" ) ]
1296+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "unchecked_shifts" , issue = "85122" ) ) ]
12981297 #[ inline( always) ]
12991298 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
13001299 pub const unsafe fn unchecked_shl( self , rhs: u32 ) -> Self {
@@ -1353,8 +1352,7 @@ macro_rules! int_impl {
13531352 /// ```
13541353 #[ stable( feature = "wrapping" , since = "1.7.0" ) ]
13551354 #[ rustc_const_stable( feature = "const_checked_int_methods" , since = "1.47.0" ) ]
1356- // We could always go back to wrapping
1357- #[ rustc_allow_const_fn_unstable( unchecked_shifts) ]
1355+ #[ cfg_attr( bootstrap, rustc_allow_const_fn_unstable( unchecked_shifts) ) ]
13581356 #[ must_use = "this returns the result of the operation, \
13591357 without modifying the original"]
13601358 #[ inline]
@@ -1420,7 +1418,7 @@ macro_rules! int_impl {
14201418 ) ]
14211419 #[ must_use = "this returns the result of the operation, \
14221420 without modifying the original"]
1423- #[ rustc_const_unstable( feature = "unchecked_shifts" , issue = "85122" ) ]
1421+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "unchecked_shifts" , issue = "85122" ) ) ]
14241422 #[ inline( always) ]
14251423 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
14261424 pub const unsafe fn unchecked_shr( self , rhs: u32 ) -> Self {
@@ -2151,7 +2149,7 @@ macro_rules! int_impl {
21512149 #[ must_use = "this returns the result of the operation, \
21522150 without modifying the original"]
21532151 #[ inline( always) ]
2154- #[ rustc_allow_const_fn_unstable( unchecked_shifts) ]
2152+ #[ cfg_attr ( bootstrap , rustc_allow_const_fn_unstable( unchecked_shifts) ) ]
21552153 pub const fn wrapping_shl( self , rhs: u32 ) -> Self {
21562154 // SAFETY: the masking by the bitsize of the type ensures that we do not shift
21572155 // out of bounds
@@ -2181,7 +2179,7 @@ macro_rules! int_impl {
21812179 #[ must_use = "this returns the result of the operation, \
21822180 without modifying the original"]
21832181 #[ inline( always) ]
2184- #[ rustc_allow_const_fn_unstable( unchecked_shifts) ]
2182+ #[ cfg_attr ( bootstrap , rustc_allow_const_fn_unstable( unchecked_shifts) ) ]
21852183 pub const fn wrapping_shr( self , rhs: u32 ) -> Self {
21862184 // SAFETY: the masking by the bitsize of the type ensures that we do not shift
21872185 // out of bounds
0 commit comments