fork/rust
git clone https://git.julia.blue/fork/rust
b8cedc00407
1.42.0
1error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator 2 --> $DIR/array-of-ranges.rs:2:14 3 | 4LL | for _ in [0..1] {} 5 | ^^^^^^ if you meant to iterate between two values, remove the square brackets 6 | 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` 10 11error[E0277]: `[std::ops::RangeInclusive<{integer}>; 1]` is not an iterator 12 --> $DIR/array-of-ranges.rs:4:14 13 | 14LL | for _ in [0..=1] {} 15 | ^^^^^^^ if you meant to iterate between two values, remove the square brackets 16 | 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` 20 21error[E0277]: `[std::ops::RangeFrom<{integer}>; 1]` is not an iterator 22 --> $DIR/array-of-ranges.rs:6:14 23 | 24LL | for _ in [0..] {} 25 | ^^^^^ if you meant to iterate from a value onwards, remove the square brackets 26 | 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` 30 31error[E0277]: `[std::ops::RangeTo<{integer}>; 1]` is not an iterator 32 --> $DIR/array-of-ranges.rs:8:14 33 | 34LL | for _ in [..1] {} 35 | ^^^^^ if you meant to iterate until a value, remove the square brackets and add a starting value 36 | 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` 40 41error[E0277]: `[std::ops::RangeToInclusive<{integer}>; 1]` is not an iterator 42 --> $DIR/array-of-ranges.rs:10:14 43 | 44LL | for _ in [..=1] {} 45 | ^^^^^^ if you meant to iterate until a value (including it), remove the square brackets and add a starting value 46 | 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` 50 51error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator 52 --> $DIR/array-of-ranges.rs:14:14 53 | 54LL | for _ in [start..end] {} 55 | ^^^^^^^^^^^^ if you meant to iterate between two values, remove the square brackets 56 | 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` 60 61error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator 62 --> $DIR/array-of-ranges.rs:17:14 63 | 64LL | for _ in array_of_range {} 65 | ^^^^^^^^^^^^^^ if you meant to iterate between two values, remove the square brackets 66 | 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` 70 71error[E0277]: `[std::ops::Range<{integer}>; 2]` is not an iterator 72 --> $DIR/array-of-ranges.rs:19:14 73 | 74LL | for _ in [0..1, 2..3] {} 75 | ^^^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it 76 | 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` 80 81error[E0277]: `[std::ops::RangeInclusive<{integer}>; 1]` is not an iterator 82 --> $DIR/array-of-ranges.rs:21:14 83 | 84LL | for _ in [0..=1] {} 85 | ^^^^^^^ if you meant to iterate between two values, remove the square brackets 86 | 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` 90 91error: aborting due to 9 previous errors 92 93For more information about this error, try `rustc --explain E0277`.