@@ -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 }
@@ -709,8 +711,9 @@ impl<T: ?Sized> *const T {
709711 /// For non-`Sized` pointees this operation considers only the data pointers,
710712 /// ignoring the metadata.
711713 #[ inline( always) ]
712- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
713- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
714+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
715+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
716+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
714717 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
715718 pub const unsafe fn byte_offset_from < U : ?Sized > ( self , origin : * const U ) -> isize {
716719 // SAFETY: the caller must uphold the safety contract for `offset_from`.
@@ -935,8 +938,9 @@ impl<T: ?Sized> *const T {
935938 /// leaving the metadata untouched.
936939 #[ must_use]
937940 #[ inline( always) ]
938- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
939- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
941+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
942+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
943+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
940944 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
941945 pub const unsafe fn byte_add ( self , count : usize ) -> Self {
942946 // SAFETY: the caller must uphold the safety contract for `add`.
@@ -1028,8 +1032,9 @@ impl<T: ?Sized> *const T {
10281032 /// leaving the metadata untouched.
10291033 #[ must_use]
10301034 #[ inline( always) ]
1031- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
1032- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
1035+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1036+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1037+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
10331038 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
10341039 pub const unsafe fn byte_sub ( self , count : usize ) -> Self {
10351040 // SAFETY: the caller must uphold the safety contract for `sub`.
@@ -1108,8 +1113,9 @@ impl<T: ?Sized> *const T {
11081113 /// leaving the metadata untouched.
11091114 #[ must_use]
11101115 #[ inline( always) ]
1111- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
1112- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
1116+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1117+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1118+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
11131119 pub const fn wrapping_byte_add ( self , count : usize ) -> Self {
11141120 self . cast :: < u8 > ( ) . wrapping_add ( count) . with_metadata_of ( self )
11151121 }
@@ -1186,8 +1192,9 @@ impl<T: ?Sized> *const T {
11861192 /// leaving the metadata untouched.
11871193 #[ must_use]
11881194 #[ inline( always) ]
1189- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
1190- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
1195+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1196+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1197+ #[ rustc_allow_const_fn_unstable( set_ptr_value) ]
11911198 pub const fn wrapping_byte_sub ( self , count : usize ) -> Self {
11921199 self . cast :: < u8 > ( ) . wrapping_sub ( count) . with_metadata_of ( self )
11931200 }
@@ -1355,7 +1362,6 @@ impl<T: ?Sized> *const T {
13551362 ///
13561363 /// ```
13571364 /// #![feature(pointer_is_aligned)]
1358- /// #![feature(pointer_byte_offsets)]
13591365 ///
13601366 /// // On some platforms, the alignment of i32 is less than 4.
13611367 /// #[repr(align(4))]
@@ -1477,7 +1483,6 @@ impl<T: ?Sized> *const T {
14771483 ///
14781484 /// ```
14791485 /// #![feature(pointer_is_aligned)]
1480- /// #![feature(pointer_byte_offsets)]
14811486 ///
14821487 /// // On some platforms, the alignment of i32 is less than 4.
14831488 /// #[repr(align(4))]
0 commit comments