@@ -165,12 +165,12 @@ const fn min_non_zero_cap(size: usize) -> usize {
165165 }
166166}
167167
168+ #[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
168169const impl<T , A : [ const ] Allocator + [ const ] Destruct > RawVec < T , A > {
169170 /// Like `with_capacity`, but parameterized over the choice of
170171 /// allocator for the returned `RawVec`.
171172 #[ cfg ( not ( no_global_oom_handling ) ) ]
172173 #[ inline ]
173- #[ rustc_const_unstable ( feature = "const_heap" , issue = "79597" ) ]
174174 pub( crate ) fn with_capacity_in ( capacity : usize , alloc : A ) -> Self
175175 {
176176 Self {
@@ -183,7 +183,6 @@ const impl<T, A: [const] Allocator + [const] Destruct> RawVec<T, A> {
183183 /// caller to ensure `len == self.capacity()`.
184184 #[ cfg( not( no_global_oom_handling) ) ]
185185 #[ inline( never) ]
186- #[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
187186 pub( crate ) fn grow_one ( & mut self )
188187 {
189188 // SAFETY: All calls on self.inner pass T::LAYOUT as the elem_layout
@@ -411,10 +410,10 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for RawVec<T, A> {
411410 }
412411}
413412
413+ #[ rustc_const_unstable ( feature = "const_heap" , issue = "79597" ) ]
414414const impl <A : [ const ] Allocator + [ const ] Destruct > RawVecInner < A > {
415415 #[ cfg ( not ( no_global_oom_handling ) ) ]
416416 #[ inline ]
417- #[ rustc_const_unstable ( feature = "const_heap" , issue = "79597" ) ]
418417 fn with_capacity_in ( capacity : usize , alloc : A , elem_layout : Layout ) -> Self
419418 {
420419 match Self :: try_allocate_in ( capacity , AllocInit :: Uninitialized , alloc , elem_layout ) {
@@ -428,7 +427,6 @@ const impl<A: [const] Allocator + [const] Destruct> RawVecInner<A> {
428427 Err ( err) => handle_error ( err) ,
429428 }
430429 }
431- #[ rustc_const_unstable ( feature = "const_heap" , issue = "79597" ) ]
432430 fn try_allocate_in (
433431 capacity: usize ,
434432 init: AllocInit ,
@@ -474,7 +472,6 @@ const impl<A: [const] Allocator + [const] Destruct> RawVecInner<A> {
474472 /// - `elem_layout`'s size must be a multiple of its alignment
475473 #[ cfg ( not ( no_global_oom_handling) ) ]
476474 #[ inline]
477- #[ rustc_const_unstable ( feature = "const_heap" , issue = "79597" ) ]
478475 unsafe fn grow_one( & mut self , elem_layout: Layout )
479476 {
480477 // SAFETY: Precondition passed to caller
@@ -489,7 +486,6 @@ const impl<A: [const] Allocator + [const] Destruct> RawVecInner<A> {
489486 /// initially construct `self`
490487 /// - `elem_layout`'s size must be a multiple of its alignment
491488 /// - The sum of `len` and `additional` must be greater than the current capacity
492- #[ rustc_const_unstable ( feature = "const_heap" , issue = "79597" ) ]
493489 unsafe fn grow_amortized(
494490 & mut self,
495491 len: usize,
@@ -532,7 +528,6 @@ const impl<A: [const] Allocator + [const] Destruct> RawVecInner<A> {
532528 // not marked inline(never) since we want optimizers to be able to observe the specifics of this
533529 // function, see tests/codegen-llvm/vec-reserve-extend.rs.
534530 #[ cold]
535- #[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
536531 unsafe fn finish_grow (
537532 & self ,
538533 cap : usize ,
0 commit comments