@@ -399,7 +399,7 @@ impl<T: ?Sized> *const T {
399
399
#[ must_use = "returns a new pointer rather than modifying its argument" ]
400
400
#[ rustc_const_stable( feature = "const_ptr_offset" , since = "1.61.0" ) ]
401
401
#[ inline( always) ]
402
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
402
+ #[ track_caller]
403
403
pub const unsafe fn offset ( self , count : isize ) -> * const T
404
404
where
405
405
T : Sized ,
@@ -452,7 +452,7 @@ impl<T: ?Sized> *const T {
452
452
#[ inline( always) ]
453
453
#[ stable( feature = "pointer_byte_offsets" , since = "1.75.0" ) ]
454
454
#[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "1.75.0" ) ]
455
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
455
+ #[ track_caller]
456
456
pub const unsafe fn byte_offset ( self , count : isize ) -> Self {
457
457
// SAFETY: the caller must uphold the safety contract for `offset`.
458
458
unsafe { self . cast :: < u8 > ( ) . offset ( count) . with_metadata_of ( self ) }
@@ -752,7 +752,7 @@ impl<T: ?Sized> *const T {
752
752
#[ unstable( feature = "ptr_sub_ptr" , issue = "95892" ) ]
753
753
#[ rustc_const_unstable( feature = "const_ptr_sub_ptr" , issue = "95892" ) ]
754
754
#[ inline]
755
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
755
+ #[ track_caller]
756
756
pub const unsafe fn sub_ptr ( self , origin : * const T ) -> usize
757
757
where
758
758
T : Sized ,
@@ -797,7 +797,7 @@ impl<T: ?Sized> *const T {
797
797
#[ unstable( feature = "ptr_sub_ptr" , issue = "95892" ) ]
798
798
#[ rustc_const_unstable( feature = "const_ptr_sub_ptr" , issue = "95892" ) ]
799
799
#[ inline]
800
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
800
+ #[ track_caller]
801
801
pub const unsafe fn byte_sub_ptr < U : ?Sized > ( self , origin : * const U ) -> usize {
802
802
// SAFETY: the caller must uphold the safety contract for `sub_ptr`.
803
803
unsafe { self . cast :: < u8 > ( ) . sub_ptr ( origin. cast :: < u8 > ( ) ) }
@@ -911,7 +911,7 @@ impl<T: ?Sized> *const T {
911
911
#[ must_use = "returns a new pointer rather than modifying its argument" ]
912
912
#[ rustc_const_stable( feature = "const_ptr_offset" , since = "1.61.0" ) ]
913
913
#[ inline( always) ]
914
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
914
+ #[ track_caller]
915
915
pub const unsafe fn add ( self , count : usize ) -> Self
916
916
where
917
917
T : Sized ,
@@ -963,7 +963,7 @@ impl<T: ?Sized> *const T {
963
963
#[ inline( always) ]
964
964
#[ stable( feature = "pointer_byte_offsets" , since = "1.75.0" ) ]
965
965
#[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "1.75.0" ) ]
966
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
966
+ #[ track_caller]
967
967
pub const unsafe fn byte_add ( self , count : usize ) -> Self {
968
968
// SAFETY: the caller must uphold the safety contract for `add`.
969
969
unsafe { self . cast :: < u8 > ( ) . add ( count) . with_metadata_of ( self ) }
@@ -1017,7 +1017,7 @@ impl<T: ?Sized> *const T {
1017
1017
#[ must_use = "returns a new pointer rather than modifying its argument" ]
1018
1018
#[ rustc_const_stable( feature = "const_ptr_offset" , since = "1.61.0" ) ]
1019
1019
#[ inline( always) ]
1020
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1020
+ #[ track_caller]
1021
1021
pub const unsafe fn sub ( self , count : usize ) -> Self
1022
1022
where
1023
1023
T : Sized ,
@@ -1075,7 +1075,7 @@ impl<T: ?Sized> *const T {
1075
1075
#[ inline( always) ]
1076
1076
#[ stable( feature = "pointer_byte_offsets" , since = "1.75.0" ) ]
1077
1077
#[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "1.75.0" ) ]
1078
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1078
+ #[ track_caller]
1079
1079
pub const unsafe fn byte_sub ( self , count : usize ) -> Self {
1080
1080
// SAFETY: the caller must uphold the safety contract for `sub`.
1081
1081
unsafe { self . cast :: < u8 > ( ) . sub ( count) . with_metadata_of ( self ) }
@@ -1246,7 +1246,7 @@ impl<T: ?Sized> *const T {
1246
1246
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1247
1247
#[ rustc_const_stable( feature = "const_ptr_read" , since = "1.71.0" ) ]
1248
1248
#[ inline]
1249
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1249
+ #[ track_caller]
1250
1250
pub const unsafe fn read ( self ) -> T
1251
1251
where
1252
1252
T : Sized ,
@@ -1267,7 +1267,7 @@ impl<T: ?Sized> *const T {
1267
1267
/// [`ptr::read_volatile`]: crate::ptr::read_volatile()
1268
1268
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1269
1269
#[ inline]
1270
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1270
+ #[ track_caller]
1271
1271
pub unsafe fn read_volatile ( self ) -> T
1272
1272
where
1273
1273
T : Sized ,
@@ -1287,7 +1287,7 @@ impl<T: ?Sized> *const T {
1287
1287
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1288
1288
#[ rustc_const_stable( feature = "const_ptr_read" , since = "1.71.0" ) ]
1289
1289
#[ inline]
1290
- #[ cfg_attr ( miri , track_caller) ] // even without panics, this helps for Miri backtraces
1290
+ #[ track_caller]
1291
1291
pub const unsafe fn read_unaligned ( self ) -> T
1292
1292
where
1293
1293
T : Sized ,
@@ -1307,7 +1307,7 @@ impl<T: ?Sized> *const T {
1307
1307
#[ rustc_const_stable( feature = "const_intrinsic_copy" , since = "1.83.0" ) ]
1308
1308
#[ stable( feature = "pointer_methods" , since = "1.26.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 copy_to ( self , dest : * mut T , count : usize )
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_nonoverlapping ( self , dest : * mut T , count : usize )
1332
1332
where
1333
1333
T : Sized ,
0 commit comments