@@ -290,8 +290,6 @@ impl<T> Box<T> {
290
290
/// # Examples
291
291
///
292
292
/// ```
293
- /// #![feature(new_zeroed_alloc)]
294
- ///
295
293
/// let zero = Box::<u32>::new_zeroed();
296
294
/// let zero = unsafe { zero.assume_init() };
297
295
///
@@ -301,7 +299,7 @@ impl<T> Box<T> {
301
299
/// [zeroed]: mem::MaybeUninit::zeroed
302
300
#[ cfg( not( no_global_oom_handling) ) ]
303
301
#[ inline]
304
- #[ unstable ( feature = "new_zeroed_alloc" , issue = "129396 " ) ]
302
+ #[ stable ( feature = "new_zeroed_alloc" , since = "CURRENT_RUSTC_VERSION " ) ]
305
303
#[ must_use]
306
304
pub fn new_zeroed ( ) -> Box < mem:: MaybeUninit < T > > {
307
305
Self :: new_zeroed_in ( Global )
@@ -358,7 +356,6 @@ impl<T> Box<T> {
358
356
/// # Ok::<(), std::alloc::AllocError>(())
359
357
/// ```
360
358
#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
361
- // #[unstable(feature = "new_uninit", issue = "63291")]
362
359
#[ inline]
363
360
pub fn try_new_uninit ( ) -> Result < Box < mem:: MaybeUninit < T > > , AllocError > {
364
361
Box :: try_new_uninit_in ( Global )
@@ -384,7 +381,6 @@ impl<T> Box<T> {
384
381
///
385
382
/// [zeroed]: mem::MaybeUninit::zeroed
386
383
#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
387
- // #[unstable(feature = "new_uninit", issue = "63291")]
388
384
#[ inline]
389
385
pub fn try_new_zeroed ( ) -> Result < Box < mem:: MaybeUninit < T > > , AllocError > {
390
386
Box :: try_new_zeroed_in ( Global )
@@ -463,7 +459,6 @@ impl<T, A: Allocator> Box<T, A> {
463
459
#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
464
460
#[ cfg( not( no_global_oom_handling) ) ]
465
461
#[ must_use]
466
- // #[unstable(feature = "new_uninit", issue = "63291")]
467
462
pub fn new_uninit_in ( alloc : A ) -> Box < mem:: MaybeUninit < T > , A >
468
463
where
469
464
A : Allocator ,
@@ -496,7 +491,6 @@ impl<T, A: Allocator> Box<T, A> {
496
491
/// # Ok::<(), std::alloc::AllocError>(())
497
492
/// ```
498
493
#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
499
- // #[unstable(feature = "new_uninit", issue = "63291")]
500
494
pub fn try_new_uninit_in ( alloc : A ) -> Result < Box < mem:: MaybeUninit < T > , A > , AllocError >
501
495
where
502
496
A : Allocator ,
@@ -532,7 +526,6 @@ impl<T, A: Allocator> Box<T, A> {
532
526
/// [zeroed]: mem::MaybeUninit::zeroed
533
527
#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
534
528
#[ cfg( not( no_global_oom_handling) ) ]
535
- // #[unstable(feature = "new_uninit", issue = "63291")]
536
529
#[ must_use]
537
530
pub fn new_zeroed_in ( alloc : A ) -> Box < mem:: MaybeUninit < T > , A >
538
531
where
@@ -570,7 +563,6 @@ impl<T, A: Allocator> Box<T, A> {
570
563
///
571
564
/// [zeroed]: mem::MaybeUninit::zeroed
572
565
#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
573
- // #[unstable(feature = "new_uninit", issue = "63291")]
574
566
pub fn try_new_zeroed_in ( alloc : A ) -> Result < Box < mem:: MaybeUninit < T > , A > , AllocError >
575
567
where
576
568
A : Allocator ,
@@ -660,8 +652,6 @@ impl<T> Box<[T]> {
660
652
/// # Examples
661
653
///
662
654
/// ```
663
- /// #![feature(new_zeroed_alloc)]
664
- ///
665
655
/// let values = Box::<[u32]>::new_zeroed_slice(3);
666
656
/// let values = unsafe { values.assume_init() };
667
657
///
@@ -670,7 +660,7 @@ impl<T> Box<[T]> {
670
660
///
671
661
/// [zeroed]: mem::MaybeUninit::zeroed
672
662
#[ cfg( not( no_global_oom_handling) ) ]
673
- #[ unstable ( feature = "new_zeroed_alloc" , issue = "129396 " ) ]
663
+ #[ stable ( feature = "new_zeroed_alloc" , since = "CURRENT_RUSTC_VERSION " ) ]
674
664
#[ must_use]
675
665
pub fn new_zeroed_slice ( len : usize ) -> Box < [ mem:: MaybeUninit < T > ] > {
676
666
unsafe { RawVec :: with_capacity_zeroed ( len) . into_box ( len) }
@@ -785,7 +775,6 @@ impl<T, A: Allocator> Box<[T], A> {
785
775
/// ```
786
776
#[ cfg( not( no_global_oom_handling) ) ]
787
777
#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
788
- // #[unstable(feature = "new_uninit", issue = "63291")]
789
778
#[ must_use]
790
779
pub fn new_uninit_slice_in ( len : usize , alloc : A ) -> Box < [ mem:: MaybeUninit < T > ] , A > {
791
780
unsafe { RawVec :: with_capacity_in ( len, alloc) . into_box ( len) }
@@ -813,7 +802,6 @@ impl<T, A: Allocator> Box<[T], A> {
813
802
/// [zeroed]: mem::MaybeUninit::zeroed
814
803
#[ cfg( not( no_global_oom_handling) ) ]
815
804
#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
816
- // #[unstable(feature = "new_uninit", issue = "63291")]
817
805
#[ must_use]
818
806
pub fn new_zeroed_slice_in ( len : usize , alloc : A ) -> Box < [ mem:: MaybeUninit < T > ] , A > {
819
807
unsafe { RawVec :: with_capacity_zeroed_in ( len, alloc) . into_box ( len) }
0 commit comments