blob: 601983a6153fd736e2ca2dd7a7103bf91dcdc78f [file] [log] [blame]
error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
--> $DIR/array-of-ranges.rs:2:14
|
LL | for _ in [0..1] {}
| ^^^^^^ if you meant to iterate between two values, remove the square brackets
|
= help: the trait `Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]`
= note: `[start..end]` is an array of one `Range`; you might have meant to have a `Range` without the brackets: `start..end`
= note: required because of the requirements on the impl of `IntoIterator` for `[std::ops::Range<{integer}>; 1]`
= note: required by `into_iter`
error[E0277]: `[RangeInclusive<{integer}>; 1]` is not an iterator
--> $DIR/array-of-ranges.rs:4:14
|
LL | for _ in [0..=1] {}
| ^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[RangeInclusive<{integer}>; 1]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[RangeInclusive<{integer}>; 1]`
= note: required by `into_iter`
error[E0277]: `[RangeFrom<{integer}>; 1]` is not an iterator
--> $DIR/array-of-ranges.rs:6:14
|
LL | for _ in [0..] {}
| ^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[RangeFrom<{integer}>; 1]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[RangeFrom<{integer}>; 1]`
= note: required by `into_iter`
error[E0277]: `[RangeTo<{integer}>; 1]` is not an iterator
--> $DIR/array-of-ranges.rs:8:14
|
LL | for _ in [..1] {}
| ^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[RangeTo<{integer}>; 1]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[RangeTo<{integer}>; 1]`
= note: required by `into_iter`
error[E0277]: `[RangeToInclusive<{integer}>; 1]` is not an iterator
--> $DIR/array-of-ranges.rs:10:14
|
LL | for _ in [..=1] {}
| ^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[RangeToInclusive<{integer}>; 1]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[RangeToInclusive<{integer}>; 1]`
= note: required by `into_iter`
error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
--> $DIR/array-of-ranges.rs:14:14
|
LL | for _ in [start..end] {}
| ^^^^^^^^^^^^ if you meant to iterate between two values, remove the square brackets
|
= help: the trait `Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]`
= note: `[start..end]` is an array of one `Range`; you might have meant to have a `Range` without the brackets: `start..end`
= note: required because of the requirements on the impl of `IntoIterator` for `[std::ops::Range<{integer}>; 1]`
= note: required by `into_iter`
error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
--> $DIR/array-of-ranges.rs:17:14
|
LL | for _ in array_of_range {}
| ^^^^^^^^^^^^^^ if you meant to iterate between two values, remove the square brackets
|
= help: the trait `Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]`
= note: `[start..end]` is an array of one `Range`; you might have meant to have a `Range` without the brackets: `start..end`
= note: required because of the requirements on the impl of `IntoIterator` for `[std::ops::Range<{integer}>; 1]`
= note: required by `into_iter`
error[E0277]: `[std::ops::Range<{integer}>; 2]` is not an iterator
--> $DIR/array-of-ranges.rs:19:14
|
LL | for _ in [0..1, 2..3] {}
| ^^^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[std::ops::Range<{integer}>; 2]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[std::ops::Range<{integer}>; 2]`
= note: required by `into_iter`
error[E0277]: `[RangeInclusive<{integer}>; 1]` is not an iterator
--> $DIR/array-of-ranges.rs:21:14
|
LL | for _ in [0..=1] {}
| ^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[RangeInclusive<{integer}>; 1]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[RangeInclusive<{integer}>; 1]`
= note: required by `into_iter`
error: aborting due to 9 previous errors
For more information about this error, try `rustc --explain E0277`.