Skip to content

Commit 57ef889

Browse files
committed
Auto merge of rust-lang#116233 - DaniPopes:stabilize-const_maybe_uninit_assume_init_read, r=dtolnay
Stabilize `const_maybe_uninit_assume_init_read` AFAICT the only reason this was not included in the `maybe_uninit_extra` stabilization was because `ptr::read` was unstable (rust-lang#92768 (comment)), which has since been stabilized in 1.71. Needs a separate FCP from the [original `maybe_uninit_extra` one](rust-lang#63567 (comment)). Tracking issue: rust-lang#63567
2 parents 9857952 + 58ed8ad commit 57ef889

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

library/core/src/mem/maybe_uninit.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,10 @@ impl<T> MaybeUninit<T> {
686686
/// // they both get dropped!
687687
/// ```
688688
#[stable(feature = "maybe_uninit_extra", since = "1.60.0")]
689-
#[rustc_const_unstable(feature = "const_maybe_uninit_assume_init_read", issue = "63567")]
689+
#[rustc_const_stable(
690+
feature = "const_maybe_uninit_assume_init_read",
691+
since = "CURRENT_RUSTC_VERSION"
692+
)]
690693
#[inline(always)]
691694
#[track_caller]
692695
pub const unsafe fn assume_init_read(&self) -> T {

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#![feature(const_hash)]
1616
#![feature(const_heap)]
1717
#![feature(const_maybe_uninit_as_mut_ptr)]
18-
#![feature(const_maybe_uninit_assume_init_read)]
1918
#![feature(const_nonnull_new)]
2019
#![feature(const_pointer_byte_offsets)]
2120
#![feature(const_pointer_is_aligned)]

0 commit comments

Comments
 (0)