1 error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
2 --> $DIR/array-of-ranges.rs:2:14
4 LL | for _ in [0..1] {}
5 | ^^^^^^ if you meant to iterate between two values, remove the square brackets
7 = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]`
8 = note: `[start..end]` is an array of one `Range`; you might have meant to have a `Range` without the brackets: `start..end`
9 = note: required by `std::iter::IntoIterator::into_iter`
11 error[E0277]: `[std::ops::RangeInclusive<{integer}>; 1]` is not an iterator
12 --> $DIR/array-of-ranges.rs:4:14
14 LL | for _ in [0..=1] {}
15 | ^^^^^^^ if you meant to iterate between two values, remove the square brackets
17 = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeInclusive<{integer}>; 1]`
18 = note: `[start..=end]` is an array of one `RangeInclusive`; you might have meant to have a `RangeInclusive` without the brackets: `start..=end`
19 = note: required by `std::iter::IntoIterator::into_iter`
21 error[E0277]: `[std::ops::RangeFrom<{integer}>; 1]` is not an iterator
22 --> $DIR/array-of-ranges.rs:6:14
24 LL | for _ in [0..] {}
25 | ^^^^^ if you meant to iterate from a value onwards, remove the square brackets
27 = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeFrom<{integer}>; 1]`
28 = note: `[start..]` is an array of one `RangeFrom`; you might have meant to have a `RangeFrom` without the brackets: `start..`, keeping in mind that iterating over an unbounded iterator will run forever unless you `break` or `return` from within the loop
29 = note: required by `std::iter::IntoIterator::into_iter`
31 error[E0277]: `[std::ops::RangeTo<{integer}>; 1]` is not an iterator
32 --> $DIR/array-of-ranges.rs:8:14
34 LL | for _ in [..1] {}
35 | ^^^^^ if you meant to iterate until a value, remove the square brackets and add a starting value
37 = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeTo<{integer}>; 1]`
38 = note: `[..end]` is an array of one `RangeTo`; you might have meant to have a bounded `Range` without the brackets: `0..end`
39 = note: required by `std::iter::IntoIterator::into_iter`
41 error[E0277]: `[std::ops::RangeToInclusive<{integer}>; 1]` is not an iterator
42 --> $DIR/array-of-ranges.rs:10:14
44 LL | for _ in [..=1] {}
45 | ^^^^^^ if you meant to iterate until a value (including it), remove the square brackets and add a starting value
47 = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeToInclusive<{integer}>; 1]`
48 = note: `[..=end]` is an array of one `RangeToInclusive`; you might have meant to have a bounded `RangeInclusive` without the brackets: `0..=end`
49 = note: required by `std::iter::IntoIterator::into_iter`
51 error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
52 --> $DIR/array-of-ranges.rs:14:14
54 LL | for _ in [start..end] {}
55 | ^^^^^^^^^^^^ if you meant to iterate between two values, remove the square brackets
57 = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]`
58 = note: `[start..end]` is an array of one `Range`; you might have meant to have a `Range` without the brackets: `start..end`
59 = note: required by `std::iter::IntoIterator::into_iter`
61 error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
62 --> $DIR/array-of-ranges.rs:17:14
64 LL | for _ in array_of_range {}
65 | ^^^^^^^^^^^^^^ if you meant to iterate between two values, remove the square brackets
67 = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]`
68 = note: `[start..end]` is an array of one `Range`; you might have meant to have a `Range` without the brackets: `start..end`
69 = note: required by `std::iter::IntoIterator::into_iter`
71 error[E0277]: `[std::ops::Range<{integer}>; 2]` is not an iterator
72 --> $DIR/array-of-ranges.rs:19:14
74 LL | for _ in [0..1, 2..3] {}
75 | ^^^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
77 = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 2]`
78 = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
79 = note: required by `std::iter::IntoIterator::into_iter`
81 error[E0277]: `[std::ops::RangeInclusive<{integer}>; 1]` is not an iterator
82 --> $DIR/array-of-ranges.rs:21:14
84 LL | for _ in [0..=1] {}
85 | ^^^^^^^ if you meant to iterate between two values, remove the square brackets
87 = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeInclusive<{integer}>; 1]`
88 = note: `[start..=end]` is an array of one `RangeInclusive`; you might have meant to have a `RangeInclusive` without the brackets: `start..=end`
89 = note: required by `std::iter::IntoIterator::into_iter`
91 error: aborting due to 9 previous errors
93 For more information about this error, try `rustc --explain E0277`.