@@ -349,10 +349,9 @@ impl<T, A: Allocator> Box<T, A> {
349
349
#[ rustc_const_unstable( feature = "const_box" , issue = "92521" ) ]
350
350
#[ must_use]
351
351
#[ inline]
352
- #[ cfg_attr( not( bootstrap) , allow( drop_bounds) ) ] // FIXME remove `~const Drop` and this attr when bumping
353
352
pub const fn new_in ( x : T , alloc : A ) -> Self
354
353
where
355
- A : ~const Allocator + ~const Drop + ~ const Destruct ,
354
+ A : ~const Allocator + ~const Destruct ,
356
355
{
357
356
let mut boxed = Self :: new_uninit_in ( alloc) ;
358
357
unsafe {
@@ -379,11 +378,10 @@ impl<T, A: Allocator> Box<T, A> {
379
378
#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
380
379
#[ rustc_const_unstable( feature = "const_box" , issue = "92521" ) ]
381
380
#[ inline]
382
- #[ cfg_attr( not( bootstrap) , allow( drop_bounds) ) ] // FIXME remove `~const Drop` and this attr when bumping
383
381
pub const fn try_new_in ( x : T , alloc : A ) -> Result < Self , AllocError >
384
382
where
385
- T : ~const Drop + ~ const Destruct ,
386
- A : ~const Allocator + ~const Drop + ~ const Destruct ,
383
+ T : ~const Destruct ,
384
+ A : ~const Allocator + ~const Destruct ,
387
385
{
388
386
let mut boxed = Self :: try_new_uninit_in ( alloc) ?;
389
387
unsafe {
@@ -417,10 +415,9 @@ impl<T, A: Allocator> Box<T, A> {
417
415
#[ cfg( not( no_global_oom_handling) ) ]
418
416
#[ must_use]
419
417
// #[unstable(feature = "new_uninit", issue = "63291")]
420
- #[ cfg_attr( not( bootstrap) , allow( drop_bounds) ) ] // FIXME remove `~const Drop` and this attr when bumping
421
418
pub const fn new_uninit_in ( alloc : A ) -> Box < mem:: MaybeUninit < T > , A >
422
419
where
423
- A : ~const Allocator + ~const Drop + ~ const Destruct ,
420
+ A : ~const Allocator + ~const Destruct ,
424
421
{
425
422
let layout = Layout :: new :: < mem:: MaybeUninit < T > > ( ) ;
426
423
// NOTE: Prefer match over unwrap_or_else since closure sometimes not inlineable.
@@ -456,10 +453,9 @@ impl<T, A: Allocator> Box<T, A> {
456
453
#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
457
454
// #[unstable(feature = "new_uninit", issue = "63291")]
458
455
#[ rustc_const_unstable( feature = "const_box" , issue = "92521" ) ]
459
- #[ cfg_attr( not( bootstrap) , allow( drop_bounds) ) ] // FIXME remove `~const Drop` and this attr when bumping
460
456
pub const fn try_new_uninit_in ( alloc : A ) -> Result < Box < mem:: MaybeUninit < T > , A > , AllocError >
461
457
where
462
- A : ~const Allocator + ~const Drop + ~ const Destruct ,
458
+ A : ~const Allocator + ~const Destruct ,
463
459
{
464
460
let layout = Layout :: new :: < mem:: MaybeUninit < T > > ( ) ;
465
461
let ptr = alloc. allocate ( layout) ?. cast ( ) ;
@@ -491,10 +487,9 @@ impl<T, A: Allocator> Box<T, A> {
491
487
#[ cfg( not( no_global_oom_handling) ) ]
492
488
// #[unstable(feature = "new_uninit", issue = "63291")]
493
489
#[ must_use]
494
- #[ cfg_attr( not( bootstrap) , allow( drop_bounds) ) ] // FIXME remove `~const Drop` and this attr when bumping
495
490
pub const fn new_zeroed_in ( alloc : A ) -> Box < mem:: MaybeUninit < T > , A >
496
491
where
497
- A : ~const Allocator + ~const Drop + ~ const Destruct ,
492
+ A : ~const Allocator + ~const Destruct ,
498
493
{
499
494
let layout = Layout :: new :: < mem:: MaybeUninit < T > > ( ) ;
500
495
// NOTE: Prefer match over unwrap_or_else since closure sometimes not inlineable.
@@ -530,10 +525,9 @@ impl<T, A: Allocator> Box<T, A> {
530
525
#[ unstable( feature = "allocator_api" , issue = "32838" ) ]
531
526
// #[unstable(feature = "new_uninit", issue = "63291")]
532
527
#[ rustc_const_unstable( feature = "const_box" , issue = "92521" ) ]
533
- #[ cfg_attr( not( bootstrap) , allow( drop_bounds) ) ] // FIXME remove `~const Drop` and this attr when bumping
534
528
pub const fn try_new_zeroed_in ( alloc : A ) -> Result < Box < mem:: MaybeUninit < T > , A > , AllocError >
535
529
where
536
- A : ~const Allocator + ~const Drop + ~ const Destruct ,
530
+ A : ~const Allocator + ~const Destruct ,
537
531
{
538
532
let layout = Layout :: new :: < mem:: MaybeUninit < T > > ( ) ;
539
533
let ptr = alloc. allocate_zeroed ( layout) ?. cast ( ) ;
@@ -547,10 +541,9 @@ impl<T, A: Allocator> Box<T, A> {
547
541
#[ rustc_const_unstable( feature = "const_box" , issue = "92521" ) ]
548
542
#[ must_use]
549
543
#[ inline( always) ]
550
- #[ cfg_attr( not( bootstrap) , allow( drop_bounds) ) ] // FIXME remove `~const Drop` and this attr when bumping
551
544
pub const fn pin_in ( x : T , alloc : A ) -> Pin < Self >
552
545
where
553
- A : ' static + ~const Allocator + ~const Drop + ~ const Destruct ,
546
+ A : ' static + ~const Allocator + ~const Destruct ,
554
547
{
555
548
Self :: into_pin ( Self :: new_in ( x, alloc) )
556
549
}
@@ -579,10 +572,9 @@ impl<T, A: Allocator> Box<T, A> {
579
572
#[ unstable( feature = "box_into_inner" , issue = "80437" ) ]
580
573
#[ rustc_const_unstable( feature = "const_box" , issue = "92521" ) ]
581
574
#[ inline]
582
- #[ cfg_attr( not( bootstrap) , allow( drop_bounds) ) ] // FIXME remove `~const Drop` and this attr when bumping
583
575
pub const fn into_inner ( boxed : Self ) -> T
584
576
where
585
- Self : ~const Drop + ~ const Destruct ,
577
+ Self : ~const Destruct ,
586
578
{
587
579
* boxed
588
580
}
0 commit comments