@@ -470,8 +470,9 @@ impl<T: ?Sized> *const T {
470470 /// leaving the metadata untouched.
471471 #[ must_use]
472472 #[ inline( always) ]
473- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
474- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
473+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
474+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
475+ #[ rustc_allow_const_fn_unstable( ptr_metadata) ]
475476 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
476477 pub const unsafe fn byte_offset ( self , count : isize ) -> Self {
477478 // SAFETY: the caller must uphold the safety contract for `offset`.
@@ -553,8 +554,9 @@ impl<T: ?Sized> *const T {
553554 /// leaving the metadata untouched.
554555 #[ must_use]
555556 #[ inline( always) ]
556- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
557- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
557+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
558+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
559+ #[ rustc_allow_const_fn_unstable( ptr_metadata) ]
558560 pub const fn wrapping_byte_offset ( self , count : isize ) -> Self {
559561 from_raw_parts :: < T > ( self . cast :: < u8 > ( ) . wrapping_offset ( count) . cast :: < ( ) > ( ) , metadata ( self ) )
560562 }
@@ -679,8 +681,9 @@ impl<T: ?Sized> *const T {
679681 /// For non-`Sized` pointees this operation considers only the data pointers,
680682 /// ignoring the metadata.
681683 #[ inline( always) ]
682- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
683- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
684+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
685+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
686+ #[ rustc_allow_const_fn_unstable( ptr_metadata) ]
684687 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
685688 pub const unsafe fn byte_offset_from ( self , origin : * const T ) -> isize {
686689 // SAFETY: the caller must uphold the safety contract for `offset_from`.
@@ -903,8 +906,9 @@ impl<T: ?Sized> *const T {
903906 /// leaving the metadata untouched.
904907 #[ must_use]
905908 #[ inline( always) ]
906- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
907- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
909+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
910+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
911+ #[ rustc_allow_const_fn_unstable( ptr_metadata) ]
908912 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
909913 pub const unsafe fn byte_add ( self , count : usize ) -> Self {
910914 // SAFETY: the caller must uphold the safety contract for `add`.
@@ -990,8 +994,9 @@ impl<T: ?Sized> *const T {
990994 /// leaving the metadata untouched.
991995 #[ must_use]
992996 #[ inline( always) ]
993- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
994- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
997+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
998+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
999+ #[ rustc_allow_const_fn_unstable( ptr_metadata) ]
9951000 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
9961001 pub const unsafe fn byte_sub ( self , count : usize ) -> Self {
9971002 // SAFETY: the caller must uphold the safety contract for `sub`.
@@ -1073,8 +1078,9 @@ impl<T: ?Sized> *const T {
10731078 /// leaving the metadata untouched.
10741079 #[ must_use]
10751080 #[ inline( always) ]
1076- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
1077- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
1081+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1082+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1083+ #[ rustc_allow_const_fn_unstable( ptr_metadata) ]
10781084 pub const fn wrapping_byte_add ( self , count : usize ) -> Self {
10791085 from_raw_parts :: < T > ( self . cast :: < u8 > ( ) . wrapping_add ( count) . cast :: < ( ) > ( ) , metadata ( self ) )
10801086 }
@@ -1153,8 +1159,9 @@ impl<T: ?Sized> *const T {
11531159 /// leaving the metadata untouched.
11541160 #[ must_use]
11551161 #[ inline( always) ]
1156- #[ unstable( feature = "pointer_byte_offsets" , issue = "96283" ) ]
1157- #[ rustc_const_unstable( feature = "const_pointer_byte_offsets" , issue = "96283" ) ]
1162+ #[ stable( feature = "pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1163+ #[ rustc_const_stable( feature = "const_pointer_byte_offsets" , since = "CURRENT_RUSTC_VERSION" ) ]
1164+ #[ rustc_allow_const_fn_unstable( ptr_metadata) ]
11581165 pub const fn wrapping_byte_sub ( self , count : usize ) -> Self {
11591166 from_raw_parts :: < T > ( self . cast :: < u8 > ( ) . wrapping_sub ( count) . cast :: < ( ) > ( ) , metadata ( self ) )
11601167 }
0 commit comments