1 error[E0277]: `[{integer}; 2]` is not an iterator
4 LL | for _ in [1, 2] {}
5 | ^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
7 = help: the trait `std::iter::Iterator` is not implemented for `[{integer}; 2]`
8 = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
9 = note: required by `std::iter::IntoIterator::into_iter`
11 error[E0277]: `[{integer}; 2]` is not an iterator
12 --> $DIR/array.rs:5:14
15 | ^ borrow the array with `&` or call `.iter()` on it to iterate over it
17 = help: the trait `std::iter::Iterator` is not implemented for `[{integer}; 2]`
18 = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
19 = note: required by `std::iter::IntoIterator::into_iter`
21 error[E0277]: `[{float}; 2]` is not an iterator
22 --> $DIR/array.rs:7:14
24 LL | for _ in [1.0, 2.0] {}
25 | ^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
27 = help: the trait `std::iter::Iterator` is not implemented for `[{float}; 2]`
28 = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
29 = note: required by `std::iter::IntoIterator::into_iter`
31 error: aborting due to 3 previous errors
33 For more information about this error, try `rustc --explain E0277`.