4 use std::array::IntoIter;
11 // In 2021, the method dispatches to `IntoIterator for [T; N]`.
12 let _: IntoIter<i32, 10> = array.into_iter();
13 let _: IntoIter<i32, 10> = Box::new(array).into_iter();
15 // The `array_into_iter` lint doesn't cover other wrappers that deref to an array.
16 let _: IntoIter<i32, 10> = Rc::new(array).into_iter();
17 let _: IntoIter<i32, 10> = Array(array).into_iter();
19 // You can always use the trait method explicitly as an array.
20 let _: IntoIter<i32, 10> = IntoIterator::into_iter(array);
23 /// User type that dereferences to an array.
24 struct Array([i32; 10]);
26 impl Deref for Array {
27 type Target = [i32; 10];
29 fn deref(&self) -> &Self::Target {