Skip to content

Commit

Permalink
Rollup merge of rust-lang#137850 - slanterns:box_uninit_write, r=ibra…
Browse files Browse the repository at this point in the history
…heemdev

Stabilize `box_uninit_write`

Closes: rust-lang#129397.
  • Loading branch information
jieyouxu authored Mar 4, 2025
2 parents 5f438e2 + 3786a7a commit 32be95c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 32be95c

Please sign in to comment.