@@ -293,6 +293,7 @@ impl<T> Box<T> {
293
293
///
294
294
/// ```
295
295
/// #![feature(new_uninit)]
296
+ /// #![feature(new_zeroed_alloc)]
296
297
///
297
298
/// let zero = Box::<u32>::new_zeroed();
298
299
/// let zero = unsafe { zero.assume_init() };
@@ -303,7 +304,7 @@ impl<T> Box<T> {
303
304
/// [zeroed]: mem::MaybeUninit::zeroed
304
305
#[ cfg( not( no_global_oom_handling) ) ]
305
306
#[ inline]
306
- #[ unstable( feature = "new_uninit " , issue = "63291 " ) ]
307
+ #[ unstable( feature = "new_zeroed_alloc " , issue = "129396 " ) ]
307
308
#[ must_use]
308
309
pub fn new_zeroed ( ) -> Box < mem:: MaybeUninit < T > > {
309
310
Self :: new_zeroed_in ( Global )
@@ -684,6 +685,7 @@ impl<T> Box<[T]> {
684
685
/// # Examples
685
686
///
686
687
/// ```
688
+ /// #![feature(new_zeroed_alloc)]
687
689
/// #![feature(new_uninit)]
688
690
///
689
691
/// let values = Box::<[u32]>::new_zeroed_slice(3);
@@ -694,7 +696,7 @@ impl<T> Box<[T]> {
694
696
///
695
697
/// [zeroed]: mem::MaybeUninit::zeroed
696
698
#[ cfg( not( no_global_oom_handling) ) ]
697
- #[ unstable( feature = "new_uninit " , issue = "63291 " ) ]
699
+ #[ unstable( feature = "new_zeroed_alloc " , issue = "129396 " ) ]
698
700
#[ must_use]
699
701
pub fn new_zeroed_slice ( len : usize ) -> Box < [ mem:: MaybeUninit < T > ] > {
700
702
unsafe { RawVec :: with_capacity_zeroed ( len) . into_box ( len) }
@@ -955,6 +957,7 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
955
957
/// # Examples
956
958
///
957
959
/// ```
960
+ /// #![feature(box_uninit_write)]
958
961
/// #![feature(new_uninit)]
959
962
///
960
963
/// let big_box = Box::<[usize; 1024]>::new_uninit();
@@ -972,7 +975,7 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
972
975
/// assert_eq!(*x, i);
973
976
/// }
974
977
/// ```
975
- #[ unstable( feature = "new_uninit " , issue = "63291 " ) ]
978
+ #[ unstable( feature = "box_uninit_write " , issue = "129397 " ) ]
976
979
#[ inline]
977
980
pub fn write ( mut boxed : Self , value : T ) -> Box < T , A > {
978
981
unsafe {
@@ -987,7 +990,7 @@ impl<T, A: Allocator> Box<[mem::MaybeUninit<T>], A> {
987
990
///
988
991
/// # Safety
989
992
///
990
- /// As with [`MaybeUninit::assume_init`],
993
+ /// As with [`MaybeUninit::assume_init`],uninit_alloc_w
991
994
/// it is up to the caller to guarantee that the values
992
995
/// really are in an initialized state.
993
996
/// Calling this when the content is not yet fully initialized
0 commit comments