Rollup merge of #137850 - slanterns:box_uninit_write, r=ibraheemdev

Stabilize `box_uninit_write`

Closes: https://github.com/rust-lang/rust/issues/129397.
This commit is contained in:
Jubilee 2025-03-04 19:37:00 -08:00 committed by GitHub
commit 0bb2f95c26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

View File

@ -937,8 +937,6 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
/// # Examples
///
/// ```
/// #![feature(box_uninit_write)]
///
/// let big_box = Box::<[usize; 1024]>::new_uninit();
///
/// let mut array = [0; 1024];
@ -954,7 +952,7 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
/// assert_eq!(*x, i);
/// }
/// ```
#[unstable(feature = "box_uninit_write", issue = "129397")]
#[stable(feature = "box_uninit_write", since = "CURRENT_RUSTC_VERSION")]
#[inline]
pub fn write(mut boxed: Self, value: T) -> Box<T, A> {
unsafe {

View File

@ -102,7 +102,6 @@
#![feature(assert_matches)]
#![feature(async_fn_traits)]
#![feature(async_iterator)]
#![feature(box_uninit_write)]
#![feature(bstr)]
#![feature(bstr_internals)]
#![feature(char_max_len)]