Skip to content

Commit d6ba798

Browse files
tgross35gitbot
authored and
gitbot
committed
Stabilize const_maybe_uninit_write
Mark the following API const stable: impl<T> MaybeUninit<T> { pub const fn write(&mut self, val: T) -> &mut T; } This depends on `const_mut_refs` and `const_maybe_uninit_assume_init`, both of which have recently been stabilized. Tracking issue: <rust-lang#63567>
1 parent 3f1c59a commit d6ba798

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
@@ -485,9 +485,9 @@ impl<T> MaybeUninit<T> {
485485
/// }
486486
/// }
487487
/// ```
488-
#[stable(feature = "maybe_uninit_write", since = "1.55.0")]
489-
#[rustc_const_unstable(feature = "const_maybe_uninit_write", issue = "63567")]
490488
#[inline(always)]
489+
#[stable(feature = "maybe_uninit_write", since = "1.55.0")]
490+
#[rustc_const_stable(feature = "const_maybe_uninit_write", since = "CURRENT_RUSTC_VERSION")]
491491
pub const fn write(&mut self, val: T) -> &mut T {
492492
*self = MaybeUninit::new(val);
493493
// SAFETY: We just initialized this value.

0 commit comments

Comments
 (0)