@@ -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 ) }
@@ -768,7 +768,7 @@ impl<T: ?Sized> *const T {
768
768
#[ stable( feature = "ptr_sub_ptr" , since = "1.87.0" ) ]
769
769
#[ rustc_const_stable( feature = "const_ptr_sub_ptr" , since = "1.87.0" ) ]
770
770
#[ inline]
771
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
771
+ #[ track_caller]
772
772
pub const unsafe fn offset_from_unsigned ( self , origin : * const T ) -> usize
773
773
where
774
774
T : Sized ,
@@ -813,7 +813,7 @@ impl<T: ?Sized> *const T {
813
813
#[ stable( feature = "ptr_sub_ptr" , since = "1.87.0" ) ]
814
814
#[ rustc_const_stable( feature = "const_ptr_sub_ptr" , since = "1.87.0" ) ]
815
815
#[ inline]
816
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
816
+ #[ track_caller]
817
817
pub const unsafe fn byte_offset_from_unsigned < U : ?Sized > ( self , origin : * const U ) -> usize {
818
818
// SAFETY: the caller must uphold the safety contract for `offset_from_unsigned`.
819
819
unsafe { self . cast :: < u8 > ( ) . offset_from_unsigned ( origin. cast :: < u8 > ( ) ) }
@@ -927,7 +927,7 @@ impl<T: ?Sized> *const T {
927
927
#[ must_use = "returns a new pointer rather than modifying its argument" ]
928
928
#[ rustc_const_stable( feature = "const_ptr_offset" , since = "1.61.0" ) ]
929
929
#[ inline( always) ]
930
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
930
+ #[ track_caller]
931
931
pub const unsafe fn add ( self , count : usize ) -> Self
932
932
where
933
933
T : Sized ,
@@ -979,7 +979,7 @@ impl<T: ?Sized> *const T {
979
979
#[ inline( always) ]
980
980
#[ stable( feature = "pointer_byte_offsets" , since = "1.75.0" ) ]
981
981
#[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "1.75.0" ) ]
982
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
982
+ #[ track_caller]
983
983
pub const unsafe fn byte_add ( self , count : usize ) -> Self {
984
984
// SAFETY: the caller must uphold the safety contract for `add`.
985
985
unsafe { self . cast :: < u8 > ( ) . add ( count) . with_metadata_of ( self ) }
@@ -1033,7 +1033,7 @@ impl<T: ?Sized> *const T {
1033
1033
#[ must_use = "returns a new pointer rather than modifying its argument" ]
1034
1034
#[ rustc_const_stable( feature = "const_ptr_offset" , since = "1.61.0" ) ]
1035
1035
#[ inline( always) ]
1036
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1036
+ #[ track_caller]
1037
1037
pub const unsafe fn sub ( self , count : usize ) -> Self
1038
1038
where
1039
1039
T : Sized ,
@@ -1091,7 +1091,7 @@ impl<T: ?Sized> *const T {
1091
1091
#[ inline( always) ]
1092
1092
#[ stable( feature = "pointer_byte_offsets" , since = "1.75.0" ) ]
1093
1093
#[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "1.75.0" ) ]
1094
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1094
+ #[ track_caller]
1095
1095
pub const unsafe fn byte_sub ( self , count : usize ) -> Self {
1096
1096
// SAFETY: the caller must uphold the safety contract for `sub`.
1097
1097
unsafe { self . cast :: < u8 > ( ) . sub ( count) . with_metadata_of ( self ) }
@@ -1264,7 +1264,7 @@ impl<T: ?Sized> *const T {
1264
1264
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1265
1265
#[ rustc_const_stable( feature = "const_ptr_read" , since = "1.71.0" ) ]
1266
1266
#[ inline]
1267
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1267
+ #[ track_caller]
1268
1268
pub const unsafe fn read ( self ) -> T
1269
1269
where
1270
1270
T : Sized ,
@@ -1285,7 +1285,7 @@ impl<T: ?Sized> *const T {
1285
1285
/// [`ptr::read_volatile`]: crate::ptr::read_volatile()
1286
1286
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1287
1287
#[ inline]
1288
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1288
+ #[ track_caller]
1289
1289
pub unsafe fn read_volatile ( self ) -> T
1290
1290
where
1291
1291
T : Sized ,
@@ -1305,7 +1305,7 @@ impl<T: ?Sized> *const T {
1305
1305
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1306
1306
#[ rustc_const_stable( feature = "const_ptr_read" , since = "1.71.0" ) ]
1307
1307
#[ inline]
1308
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1308
+ #[ track_caller]
1309
1309
pub const unsafe fn read_unaligned ( self ) -> T
1310
1310
where
1311
1311
T : Sized ,
@@ -1325,7 +1325,7 @@ impl<T: ?Sized> *const T {
1325
1325
#[ rustc_const_stable( feature = "const_intrinsic_copy" , since = "1.83.0" ) ]
1326
1326
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1327
1327
#[ inline]
1328
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1328
+ #[ track_caller]
1329
1329
pub const unsafe fn copy_to ( self , dest : * mut T , count : usize )
1330
1330
where
1331
1331
T : Sized ,
@@ -1345,7 +1345,7 @@ impl<T: ?Sized> *const T {
1345
1345
#[ rustc_const_stable( feature = "const_intrinsic_copy" , since = "1.83.0" ) ]
1346
1346
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1347
1347
#[ inline]
1348
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1348
+ #[ track_caller]
1349
1349
pub const unsafe fn copy_to_nonoverlapping ( self , dest : * mut T , count : usize )
1350
1350
where
1351
1351
T : Sized ,
0 commit comments