@@ -480,8 +480,9 @@ impl<T: ?Sized> *const T {
480480 /// leaving the metadata untouched.
481481 #[ must_use]
482482 #[ inline( always) ]
483- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
484- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
483+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
484+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
485+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
485486 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
486487 pub const unsafe fn byte_offset ( self , count : isize ) -> Self {
487488 // SAFETY: the caller must uphold the safety contract for `offset`.
@@ -560,8 +561,9 @@ impl<T: ?Sized> *const T {
560561 /// leaving the metadata untouched.
561562 #[ must_use]
562563 #[ inline( always) ]
563- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
564- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
564+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
565+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
566+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
565567 pub const fn wrapping_byte_offset ( self , count : isize ) -> Self {
566568 self . cast :: < u8 > ( ) . wrapping_offset ( count) . with_metadata_of ( self )
567569 }
@@ -726,8 +728,9 @@ impl<T: ?Sized> *const T {
726728 /// For non-`Sized` pointees this operation considers only the data pointers,
727729 /// ignoring the metadata.
728730 #[ inline( always) ]
729- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
730- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
731+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
732+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
733+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
731734 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
732735 pub const unsafe fn byte_offset_from < U : ?Sized > ( self , origin : * const U ) -> isize {
733736 // SAFETY: the caller must uphold the safety contract for `offset_from`.
@@ -952,8 +955,9 @@ impl<T: ?Sized> *const T {
952955 /// leaving the metadata untouched.
953956 #[ must_use]
954957 #[ inline( always) ]
955- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
956- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
958+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
959+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
960+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
957961 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
958962 pub const unsafe fn byte_add ( self , count : usize ) -> Self {
959963 // SAFETY: the caller must uphold the safety contract for `add`.
@@ -1045,8 +1049,9 @@ impl<T: ?Sized> *const T {
10451049 /// leaving the metadata untouched.
10461050 #[ must_use]
10471051 #[ inline( always) ]
1048- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
1049- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
1052+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1053+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1054+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
10501055 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
10511056 pub const unsafe fn byte_sub ( self , count : usize ) -> Self {
10521057 // SAFETY: the caller must uphold the safety contract for `sub`.
@@ -1125,8 +1130,9 @@ impl<T: ?Sized> *const T {
11251130 /// leaving the metadata untouched.
11261131 #[ must_use]
11271132 #[ inline( always) ]
1128- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
1129- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
1133+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1134+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1135+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
11301136 pub const fn wrapping_byte_add ( self , count : usize ) -> Self {
11311137 self . cast :: < u8 > ( ) . wrapping_add ( count) . with_metadata_of ( self )
11321138 }
@@ -1203,8 +1209,9 @@ impl<T: ?Sized> *const T {
12031209 /// leaving the metadata untouched.
12041210 #[ must_use]
12051211 #[ inline( always) ]
1206- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
1207- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
1212+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1213+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1214+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
12081215 pub const fn wrapping_byte_sub ( self , count : usize ) -> Self {
12091216 self . cast :: < u8 > ( ) . wrapping_sub ( count) . with_metadata_of ( self )
12101217 }
@@ -1372,7 +1379,6 @@ impl<T: ?Sized> *const T {
13721379 ///
13731380 /// ```
13741381 /// #![feature(pointer_is_aligned)]
1375- /// #![feature(pointer_byte_offsets)]
13761382 ///
13771383 /// // On some platforms, the alignment of i32 is less than 4.
13781384 /// #[repr(align(4))]
@@ -1494,7 +1500,6 @@ impl<T: ?Sized> *const T {
14941500 ///
14951501 /// ```
14961502 /// #![feature(pointer_is_aligned)]
1497- /// #![feature(pointer_byte_offsets)]
14981503 ///
14991504 /// // On some platforms, the alignment of i32 is less than 4.
15001505 /// #[repr(align(4))]
0 commit comments