@@ -7,7 +7,7 @@ use core::pin::Pin;
77use core:: task:: { Context , Poll } ;
88use core:: { ptr, slice} ;
99
10- use crate :: alloc:: Allocator ;
10+ use crate :: alloc:: { Allocator , Global } ;
1111#[ cfg( not( no_global_oom_handling) ) ]
1212use crate :: borrow:: Cow ;
1313use crate :: boxed:: Box ;
@@ -204,7 +204,7 @@ impl<I, const N: usize, A: Allocator> !Iterator for Box<[I; N], A> {}
204204/// A by-value `Box<[T; N]>` iterator.
205205#[ stable( feature = "boxed_array_value_iter" , since = "CURRENT_RUSTC_VERSION" ) ]
206206#[ rustc_insignificant_dtor]
207- pub struct BoxedArrayIntoIter < T , const N : usize , A : Allocator > {
207+ pub struct BoxedArrayIntoIter < T , const N : usize , A : Allocator = Global > {
208208 /// This is the array we are iterating over.
209209 ///
210210 /// Elements with index `i` where `alive.start <= i < alive.end` have not
@@ -411,6 +411,7 @@ where
411411 const MAY_HAVE_SIDE_EFFECT : bool = false ;
412412}
413413
414+ #[ cfg( not( no_global_oom_handling) ) ]
414415#[ stable( feature = "boxed_array_value_iter" , since = "CURRENT_RUSTC_VERSION" ) ]
415416impl < T : Clone , const N : usize , A : Clone + Allocator > Clone for BoxedArrayIntoIter < T , N , A > {
416417 fn clone ( & self ) -> Self {
0 commit comments