diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index a4e7ea5eff5ba..b6de9f57b0110 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -2970,7 +2970,6 @@ impl NonNull { /// some other means. #[stable(feature = "nonnull", since = "1.25.0")] #[inline] - #[rustc_const_unstable(feature = "const_ptr_nonnull")] pub const fn dangling() -> Self { unsafe { let ptr = mem::align_of::() as *mut T; @@ -3034,7 +3033,6 @@ impl NonNull { /// Cast to a pointer of another type #[stable(feature = "nonnull_cast", since = "1.27.0")] #[inline] - #[rustc_const_unstable(feature = "const_ptr_nonnull")] pub const fn cast(self) -> NonNull { unsafe { NonNull::new_unchecked(self.as_ptr() as *mut U) diff --git a/src/test/run-pass/consts/const-ptr-nonnull.rs b/src/test/run-pass/consts/const-ptr-nonnull.rs index 91624e92fbe75..c5b9d837b47a8 100644 --- a/src/test/run-pass/consts/const-ptr-nonnull.rs +++ b/src/test/run-pass/consts/const-ptr-nonnull.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(const_ptr_nonnull)] - use std::ptr::NonNull; const DANGLING: NonNull = NonNull::dangling();