@@ -416,7 +416,7 @@ impl<T: ?Sized> *const T {
416
416
#[ must_use = "returns a new pointer rather than modifying its argument" ]
417
417
#[ rustc_const_stable( feature = "const_ptr_offset" , since = "1.61.0" ) ]
418
418
#[ inline( always) ]
419
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
419
+ #[ track_caller]
420
420
pub const unsafe fn offset ( self , count : isize ) -> * const T
421
421
where
422
422
T : Sized ,
@@ -469,7 +469,7 @@ impl<T: ?Sized> *const T {
469
469
#[ inline( always) ]
470
470
#[ stable( feature = "pointer_byte_offsets" , since = "1.75.0" ) ]
471
471
#[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "1.75.0" ) ]
472
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
472
+ #[ track_caller]
473
473
pub const unsafe fn byte_offset ( self , count : isize ) -> Self {
474
474
// SAFETY: the caller must uphold the safety contract for `offset`.
475
475
unsafe { self . cast :: < u8 > ( ) . offset ( count) . with_metadata_of ( self ) }
@@ -770,7 +770,7 @@ impl<T: ?Sized> *const T {
770
770
#[ unstable( feature = "ptr_sub_ptr" , issue = "95892" ) ]
771
771
#[ rustc_const_unstable( feature = "const_ptr_sub_ptr" , issue = "95892" ) ]
772
772
#[ inline]
773
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
773
+ #[ track_caller]
774
774
pub const unsafe fn sub_ptr ( self , origin : * const T ) -> usize
775
775
where
776
776
T : Sized ,
@@ -815,7 +815,7 @@ impl<T: ?Sized> *const T {
815
815
#[ unstable( feature = "ptr_sub_ptr" , issue = "95892" ) ]
816
816
#[ rustc_const_unstable( feature = "const_ptr_sub_ptr" , issue = "95892" ) ]
817
817
#[ inline]
818
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
818
+ #[ track_caller]
819
819
pub const unsafe fn byte_sub_ptr < U : ?Sized > ( self , origin : * const U ) -> usize {
820
820
// SAFETY: the caller must uphold the safety contract for `sub_ptr`.
821
821
unsafe { self . cast :: < u8 > ( ) . sub_ptr ( origin. cast :: < u8 > ( ) ) }
@@ -929,7 +929,7 @@ impl<T: ?Sized> *const T {
929
929
#[ must_use = "returns a new pointer rather than modifying its argument" ]
930
930
#[ rustc_const_stable( feature = "const_ptr_offset" , since = "1.61.0" ) ]
931
931
#[ inline( always) ]
932
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
932
+ #[ track_caller]
933
933
pub const unsafe fn add ( self , count : usize ) -> Self
934
934
where
935
935
T : Sized ,
@@ -981,7 +981,7 @@ impl<T: ?Sized> *const T {
981
981
#[ inline( always) ]
982
982
#[ stable( feature = "pointer_byte_offsets" , since = "1.75.0" ) ]
983
983
#[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "1.75.0" ) ]
984
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
984
+ #[ track_caller]
985
985
pub const unsafe fn byte_add ( self , count : usize ) -> Self {
986
986
// SAFETY: the caller must uphold the safety contract for `add`.
987
987
unsafe { self . cast :: < u8 > ( ) . add ( count) . with_metadata_of ( self ) }
@@ -1035,7 +1035,7 @@ impl<T: ?Sized> *const T {
1035
1035
#[ must_use = "returns a new pointer rather than modifying its argument" ]
1036
1036
#[ rustc_const_stable( feature = "const_ptr_offset" , since = "1.61.0" ) ]
1037
1037
#[ inline( always) ]
1038
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1038
+ #[ track_caller]
1039
1039
pub const unsafe fn sub ( self , count : usize ) -> Self
1040
1040
where
1041
1041
T : Sized ,
@@ -1093,7 +1093,7 @@ impl<T: ?Sized> *const T {
1093
1093
#[ inline( always) ]
1094
1094
#[ stable( feature = "pointer_byte_offsets" , since = "1.75.0" ) ]
1095
1095
#[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "1.75.0" ) ]
1096
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1096
+ #[ track_caller]
1097
1097
pub const unsafe fn byte_sub ( self , count : usize ) -> Self {
1098
1098
// SAFETY: the caller must uphold the safety contract for `sub`.
1099
1099
unsafe { self . cast :: < u8 > ( ) . sub ( count) . with_metadata_of ( self ) }
@@ -1266,7 +1266,7 @@ impl<T: ?Sized> *const T {
1266
1266
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1267
1267
#[ rustc_const_stable( feature = "const_ptr_read" , since = "1.71.0" ) ]
1268
1268
#[ inline]
1269
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1269
+ #[ track_caller]
1270
1270
pub const unsafe fn read ( self ) -> T
1271
1271
where
1272
1272
T : Sized ,
@@ -1287,7 +1287,7 @@ impl<T: ?Sized> *const T {
1287
1287
/// [`ptr::read_volatile`]: crate::ptr::read_volatile()
1288
1288
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1289
1289
#[ inline]
1290
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1290
+ #[ track_caller]
1291
1291
pub unsafe fn read_volatile ( self ) -> T
1292
1292
where
1293
1293
T : Sized ,
@@ -1307,7 +1307,7 @@ impl<T: ?Sized> *const T {
1307
1307
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1308
1308
#[ rustc_const_stable( feature = "const_ptr_read" , since = "1.71.0" ) ]
1309
1309
#[ inline]
1310
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1310
+ #[ track_caller]
1311
1311
pub const unsafe fn read_unaligned ( self ) -> T
1312
1312
where
1313
1313
T : Sized ,
@@ -1327,7 +1327,7 @@ impl<T: ?Sized> *const T {
1327
1327
#[ rustc_const_stable( feature = "const_intrinsic_copy" , since = "1.83.0" ) ]
1328
1328
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1329
1329
#[ inline]
1330
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1330
+ #[ track_caller]
1331
1331
pub const unsafe fn copy_to ( self , dest : * mut T , count : usize )
1332
1332
where
1333
1333
T : Sized ,
@@ -1347,7 +1347,7 @@ impl<T: ?Sized> *const T {
1347
1347
#[ rustc_const_stable( feature = "const_intrinsic_copy" , since = "1.83.0" ) ]
1348
1348
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1349
1349
#[ inline]
1350
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1350
+ #[ track_caller]
1351
1351
pub const unsafe fn copy_to_nonoverlapping ( self , dest : * mut T , count : usize )
1352
1352
where
1353
1353
T : Sized ,
0 commit comments