diff --git a/core/src/lib.rs b/core/src/lib.rs index ba30c4eab1180..bcc38720ad1a1 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -140,7 +140,6 @@ #![feature(const_option_ext)] #![feature(const_pin)] #![feature(const_pointer_is_aligned)] -#![feature(const_ptr_as_ref)] #![feature(const_ptr_is_null)] #![feature(const_ptr_sub_ptr)] #![feature(const_ptr_write)] diff --git a/core/src/ptr/non_null.rs b/core/src/ptr/non_null.rs index daa40b3c9d2e5..f89db6a447047 100644 --- a/core/src/ptr/non_null.rs +++ b/core/src/ptr/non_null.rs @@ -394,7 +394,8 @@ impl NonNull { /// /// [the module documentation]: crate::ptr#safety #[stable(feature = "nonnull", since = "1.25.0")] - #[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")] + #[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))] + #[rustc_const_stable(feature = "const_ptr_as_ref", since = "CURRENT_RUSTC_VERSION")] #[must_use] #[inline(always)] pub const unsafe fn as_mut<'a>(&mut self) -> &'a mut T { diff --git a/core/tests/lib.rs b/core/tests/lib.rs index 604c0d4874362..ae055fd6a2b64 100644 --- a/core/tests/lib.rs +++ b/core/tests/lib.rs @@ -30,7 +30,6 @@ #![feature(const_option_ext)] #![feature(const_pin)] #![feature(const_pointer_is_aligned)] -#![feature(const_ptr_as_ref)] #![feature(const_ptr_write)] #![feature(const_result)] #![feature(const_slice_from_ref)]