@@ -58,6 +58,7 @@ use core::cmp;
5858use core:: cmp:: Ordering ;
5959use core:: fmt;
6060use core:: hash:: { Hash , Hasher } ;
61+ #[ cfg( not( no_global_oom_handling) ) ]
6162use core:: iter;
6263use core:: marker:: PhantomData ;
6364use core:: mem:: { self , ManuallyDrop , MaybeUninit , SizedTypeProperties } ;
@@ -101,6 +102,7 @@ mod into_iter;
101102#[ cfg( not( no_global_oom_handling) ) ]
102103use self :: is_zero:: IsZero ;
103104
105+ #[ cfg( not( no_global_oom_handling) ) ]
104106mod is_zero;
105107
106108#[ cfg( not( no_global_oom_handling) ) ]
@@ -2599,6 +2601,7 @@ pub fn from_elem_in<T: Clone, A: Allocator>(elem: T, n: usize, alloc: A) -> Vec<
25992601 <T as SpecFromElem >:: from_elem ( elem, n, alloc)
26002602}
26012603
2604+ #[ cfg( not( no_global_oom_handling) ) ]
26022605trait ExtendFromWithinSpec {
26032606 /// # Safety
26042607 ///
@@ -2607,6 +2610,7 @@ trait ExtendFromWithinSpec {
26072610 unsafe fn spec_extend_from_within ( & mut self , src : Range < usize > ) ;
26082611}
26092612
2613+ #[ cfg( not( no_global_oom_handling) ) ]
26102614impl < T : Clone , A : Allocator > ExtendFromWithinSpec for Vec < T , A > {
26112615 default unsafe fn spec_extend_from_within ( & mut self , src : Range < usize > ) {
26122616 // SAFETY:
@@ -2626,6 +2630,7 @@ impl<T: Clone, A: Allocator> ExtendFromWithinSpec for Vec<T, A> {
26262630 }
26272631}
26282632
2633+ #[ cfg( not( no_global_oom_handling) ) ]
26292634impl < T : Copy , A : Allocator > ExtendFromWithinSpec for Vec < T , A > {
26302635 unsafe fn spec_extend_from_within ( & mut self , src : Range < usize > ) {
26312636 let count = src. len ( ) ;
0 commit comments