@@ -510,7 +510,7 @@ macro_rules! int_impl {
510
510
#[ must_use = "this returns the result of the operation, \
511
511
without modifying the original"]
512
512
#[ inline( always) ]
513
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
513
+ #[ track_caller]
514
514
pub const unsafe fn unchecked_add( self , rhs: Self ) -> Self {
515
515
assert_unsafe_precondition!(
516
516
check_language_ub,
@@ -662,7 +662,7 @@ macro_rules! int_impl {
662
662
#[ must_use = "this returns the result of the operation, \
663
663
without modifying the original"]
664
664
#[ inline( always) ]
665
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
665
+ #[ track_caller]
666
666
pub const unsafe fn unchecked_sub( self , rhs: Self ) -> Self {
667
667
assert_unsafe_precondition!(
668
668
check_language_ub,
@@ -814,7 +814,7 @@ macro_rules! int_impl {
814
814
#[ must_use = "this returns the result of the operation, \
815
815
without modifying the original"]
816
816
#[ inline( always) ]
817
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
817
+ #[ track_caller]
818
818
pub const unsafe fn unchecked_mul( self , rhs: Self ) -> Self {
819
819
assert_unsafe_precondition!(
820
820
check_language_ub,
@@ -1163,7 +1163,7 @@ macro_rules! int_impl {
1163
1163
without modifying the original"]
1164
1164
#[ rustc_const_unstable( feature = "unchecked_neg" , issue = "85122" ) ]
1165
1165
#[ inline( always) ]
1166
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1166
+ #[ track_caller]
1167
1167
pub const unsafe fn unchecked_neg( self ) -> Self {
1168
1168
assert_unsafe_precondition!(
1169
1169
check_language_ub,
@@ -1296,7 +1296,7 @@ macro_rules! int_impl {
1296
1296
without modifying the original"]
1297
1297
#[ rustc_const_unstable( feature = "unchecked_shifts" , issue = "85122" ) ]
1298
1298
#[ inline( always) ]
1299
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1299
+ #[ track_caller]
1300
1300
pub const unsafe fn unchecked_shl( self , rhs: u32 ) -> Self {
1301
1301
assert_unsafe_precondition!(
1302
1302
check_language_ub,
@@ -1422,7 +1422,7 @@ macro_rules! int_impl {
1422
1422
without modifying the original"]
1423
1423
#[ rustc_const_unstable( feature = "unchecked_shifts" , issue = "85122" ) ]
1424
1424
#[ inline( always) ]
1425
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1425
+ #[ track_caller]
1426
1426
pub const unsafe fn unchecked_shr( self , rhs: u32 ) -> Self {
1427
1427
assert_unsafe_precondition!(
1428
1428
check_language_ub,
0 commit comments