Skip to content

Commit c12546b

Browse files
committed
stabilize const_maybe_uninit_as_mut_ptr
1 parent 1509944 commit c12546b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/mem/maybe_uninit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ impl<T> MaybeUninit<T> {
393393
// These are OK to allow since we do not leak &mut to user-visible API
394394
#[rustc_allow_const_fn_unstable(const_mut_refs)]
395395
#[rustc_allow_const_fn_unstable(const_ptr_write)]
396-
#[rustc_allow_const_fn_unstable(const_maybe_uninit_as_mut_ptr)]
397396
#[rustc_const_stable(feature = "const_maybe_uninit_zeroed", since = "1.75.0")]
398397
pub const fn zeroed() -> MaybeUninit<T> {
399398
let mut u = MaybeUninit::<T>::uninit();
@@ -570,7 +569,8 @@ impl<T> MaybeUninit<T> {
570569
/// (Notice that the rules around references to uninitialized data are not finalized yet, but
571570
/// until they are, it is advisable to avoid them.)
572571
#[stable(feature = "maybe_uninit", since = "1.36.0")]
573-
#[rustc_const_unstable(feature = "const_maybe_uninit_as_mut_ptr", issue = "75251")]
572+
#[rustc_const_stable(feature = "const_maybe_uninit_as_mut_ptr", since = "CURRENT_RUSTC_VERSION")]
573+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
574574
#[inline(always)]
575575
pub const fn as_mut_ptr(&mut self) -> *mut T {
576576
// `MaybeUninit` and `ManuallyDrop` are both `repr(transparent)` so we can cast the pointer.

0 commit comments

Comments
 (0)