@@ -723,7 +723,6 @@ impl<T: ?Sized> *const T {
723
723
/// to [`sub`](#method.sub)). The following are all equivalent, assuming
724
724
/// that their safety preconditions are met:
725
725
/// ```rust
726
- /// # #![feature(ptr_sub_ptr)]
727
726
/// # unsafe fn blah(ptr: *const i32, origin: *const i32, count: usize) -> bool { unsafe {
728
727
/// ptr.sub_ptr(origin) == count
729
728
/// # &&
@@ -752,8 +751,6 @@ impl<T: ?Sized> *const T {
752
751
/// # Examples
753
752
///
754
753
/// ```
755
- /// #![feature(ptr_sub_ptr)]
756
- ///
757
754
/// let a = [0; 5];
758
755
/// let ptr1: *const i32 = &a[1];
759
756
/// let ptr2: *const i32 = &a[3];
@@ -767,8 +764,8 @@ impl<T: ?Sized> *const T {
767
764
/// // This would be incorrect, as the pointers are not correctly ordered:
768
765
/// // ptr1.sub_ptr(ptr2)
769
766
/// ```
770
- #[ unstable ( feature = "ptr_sub_ptr" , issue = "95892 " ) ]
771
- #[ rustc_const_unstable ( feature = "const_ptr_sub_ptr" , issue = "95892 " ) ]
767
+ #[ stable ( feature = "ptr_sub_ptr" , since = "CURRENT_RUSTC_VERSION " ) ]
768
+ #[ rustc_const_stable ( feature = "const_ptr_sub_ptr" , since = "CURRENT_RUSTC_VERSION " ) ]
772
769
#[ inline]
773
770
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
774
771
pub const unsafe fn sub_ptr ( self , origin : * const T ) -> usize
@@ -812,8 +809,8 @@ impl<T: ?Sized> *const T {
812
809
///
813
810
/// For non-`Sized` pointees this operation considers only the data pointers,
814
811
/// ignoring the metadata.
815
- #[ unstable ( feature = "ptr_sub_ptr" , issue = "95892 " ) ]
816
- #[ rustc_const_unstable ( feature = "const_ptr_sub_ptr" , issue = "95892 " ) ]
812
+ #[ stable ( feature = "ptr_sub_ptr" , since = "CURRENT_RUSTC_VERSION " ) ]
813
+ #[ rustc_const_stable ( feature = "const_ptr_sub_ptr" , since = "CURRENT_RUSTC_VERSION " ) ]
817
814
#[ inline]
818
815
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
819
816
pub const unsafe fn byte_sub_ptr < U : ?Sized > ( self , origin : * const U ) -> usize {
0 commit comments