@@ -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 ;
@@ -214,7 +214,7 @@ impl<'a, const N: usize, I, A: Allocator> !Iterator for &'a mut Box<[I; N], A> {
214214/// A by-value `Box<[T; N]>` iterator.
215215#[ stable( feature = "boxed_array_value_iter" , since = "CURRENT_RUSTC_VERSION" ) ]
216216#[ rustc_insignificant_dtor]
217- pub struct BoxedArrayIntoIter < T , const N : usize , A : Allocator > {
217+ pub struct BoxedArrayIntoIter < T , const N : usize , A : Allocator = Global > {
218218 /// This is the array we are iterating over.
219219 ///
220220 /// Elements with index `i` where `alive.start <= i < alive.end` have not
@@ -421,6 +421,7 @@ where
421421 const MAY_HAVE_SIDE_EFFECT : bool = false ;
422422}
423423
424+ #[ cfg( not( no_global_oom_handling) ) ]
424425#[ stable( feature = "boxed_array_value_iter" , since = "CURRENT_RUSTC_VERSION" ) ]
425426impl < T : Clone , const N : usize , A : Clone + Allocator > Clone for BoxedArrayIntoIter < T , N , A > {
426427 fn clone ( & self ) -> Self {
0 commit comments