@@ -58,6 +58,7 @@ use core::cmp;
58
58
use core:: cmp:: Ordering ;
59
59
use core:: fmt;
60
60
use core:: hash:: { Hash , Hasher } ;
61
+ #[ cfg( not( no_global_oom_handling) ) ]
61
62
use core:: iter;
62
63
use core:: marker:: PhantomData ;
63
64
use core:: mem:: { self , ManuallyDrop , MaybeUninit , SizedTypeProperties } ;
@@ -101,6 +102,7 @@ mod into_iter;
101
102
#[ cfg( not( no_global_oom_handling) ) ]
102
103
use self :: is_zero:: IsZero ;
103
104
105
+ #[ cfg( not( no_global_oom_handling) ) ]
104
106
mod is_zero;
105
107
106
108
#[ 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<
2599
2601
<T as SpecFromElem >:: from_elem ( elem, n, alloc)
2600
2602
}
2601
2603
2604
+ #[ cfg( not( no_global_oom_handling) ) ]
2602
2605
trait ExtendFromWithinSpec {
2603
2606
/// # Safety
2604
2607
///
@@ -2607,6 +2610,7 @@ trait ExtendFromWithinSpec {
2607
2610
unsafe fn spec_extend_from_within ( & mut self , src : Range < usize > ) ;
2608
2611
}
2609
2612
2613
+ #[ cfg( not( no_global_oom_handling) ) ]
2610
2614
impl < T : Clone , A : Allocator > ExtendFromWithinSpec for Vec < T , A > {
2611
2615
default unsafe fn spec_extend_from_within ( & mut self , src : Range < usize > ) {
2612
2616
// SAFETY:
@@ -2626,6 +2630,7 @@ impl<T: Clone, A: Allocator> ExtendFromWithinSpec for Vec<T, A> {
2626
2630
}
2627
2631
}
2628
2632
2633
+ #[ cfg( not( no_global_oom_handling) ) ]
2629
2634
impl < T : Copy , A : Allocator > ExtendFromWithinSpec for Vec < T , A > {
2630
2635
unsafe fn spec_extend_from_within ( & mut self , src : Range < usize > ) {
2631
2636
let count = src. len ( ) ;
0 commit comments