Auto merge of #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 (https://github.com/rust-lang/rust/pull/92768#issuecomment-1011101383), which has since been stabilized in 1.71. Needs a separate FCP from the [original `maybe_uninit_extra` one](https://github.com/rust-lang/rust/issues/63567#issuecomment-964428807). Tracking issue: #63567
This commit is contained in:
commit
57ef889852
@ -686,7 +686,10 @@ impl<T> MaybeUninit<T> {
|
||||
/// // they both get dropped!
|
||||
/// ```
|
||||
#[stable(feature = "maybe_uninit_extra", since = "1.60.0")]
|
||||
#[rustc_const_unstable(feature = "const_maybe_uninit_assume_init_read", issue = "63567")]
|
||||
#[rustc_const_stable(
|
||||
feature = "const_maybe_uninit_assume_init_read",
|
||||
since = "CURRENT_RUSTC_VERSION"
|
||||
)]
|
||||
#[inline(always)]
|
||||
#[track_caller]
|
||||
pub const unsafe fn assume_init_read(&self) -> T {
|
||||
|
@ -15,7 +15,6 @@
|
||||
#![feature(const_hash)]
|
||||
#![feature(const_heap)]
|
||||
#![feature(const_maybe_uninit_as_mut_ptr)]
|
||||
#![feature(const_maybe_uninit_assume_init_read)]
|
||||
#![feature(const_nonnull_new)]
|
||||
#![feature(const_pointer_byte_offsets)]
|
||||
#![feature(const_pointer_is_aligned)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user