]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/iterators/array-of-ranges.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / iterators / array-of-ranges.stderr
index 3dbed9a106509338d61133b9494a30f543f6cd64..6271d8107bc05b74f945146cf965166b80c2cac7 100644 (file)
@@ -4,49 +4,49 @@ error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
 LL |     for _ in [0..1] {}
    |              ^^^^^^ if you meant to iterate between two values, remove the square brackets
    |
-   = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]`
+   = 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 by `std::iter::IntoIterator::into_iter`
+   = note: required by `into_iter`
 
-error[E0277]: `[std::ops::RangeInclusive<{integer}>; 1]` is not an iterator
+error[E0277]: `[RangeInclusive<{integer}>; 1]` is not an iterator
   --> $DIR/array-of-ranges.rs:4:14
    |
 LL |     for _ in [0..=1] {}
-   |              ^^^^^^^ if you meant to iterate between two values, remove the square brackets
+   |              ^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
    |
-   = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeInclusive<{integer}>; 1]`
-   = note: `[start..=end]` is an array of one `RangeInclusive`; you might have meant to have a `RangeInclusive` without the brackets: `start..=end`
-   = note: required by `std::iter::IntoIterator::into_iter`
+   = 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 by `into_iter`
 
-error[E0277]: `[std::ops::RangeFrom<{integer}>; 1]` is not an iterator
+error[E0277]: `[RangeFrom<{integer}>; 1]` is not an iterator
   --> $DIR/array-of-ranges.rs:6:14
    |
 LL |     for _ in [0..] {}
-   |              ^^^^^ if you meant to iterate from a value onwards, remove the square brackets
+   |              ^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
    |
-   = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeFrom<{integer}>; 1]`
-   = 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
-   = note: required by `std::iter::IntoIterator::into_iter`
+   = 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 by `into_iter`
 
-error[E0277]: `[std::ops::RangeTo<{integer}>; 1]` is not an iterator
+error[E0277]: `[RangeTo<{integer}>; 1]` is not an iterator
   --> $DIR/array-of-ranges.rs:8:14
    |
 LL |     for _ in [..1] {}
-   |              ^^^^^ if you meant to iterate until a value, remove the square brackets and add a starting value
+   |              ^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
    |
-   = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeTo<{integer}>; 1]`
-   = note: `[..end]` is an array of one `RangeTo`; you might have meant to have a bounded `Range` without the brackets: `0..end`
-   = note: required by `std::iter::IntoIterator::into_iter`
+   = 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 by `into_iter`
 
-error[E0277]: `[std::ops::RangeToInclusive<{integer}>; 1]` is not an iterator
+error[E0277]: `[RangeToInclusive<{integer}>; 1]` is not an iterator
   --> $DIR/array-of-ranges.rs:10:14
    |
 LL |     for _ in [..=1] {}
-   |              ^^^^^^ if you meant to iterate until a value (including it), remove the square brackets and add a starting value
+   |              ^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
    |
-   = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeToInclusive<{integer}>; 1]`
-   = note: `[..=end]` is an array of one `RangeToInclusive`; you might have meant to have a bounded `RangeInclusive` without the brackets: `0..=end`
-   = note: required by `std::iter::IntoIterator::into_iter`
+   = 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 by `into_iter`
 
 error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
   --> $DIR/array-of-ranges.rs:14:14
@@ -54,9 +54,9 @@ error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
 LL |     for _ in [start..end] {}
    |              ^^^^^^^^^^^^ if you meant to iterate between two values, remove the square brackets
    |
-   = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]`
+   = 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 by `std::iter::IntoIterator::into_iter`
+   = note: required by `into_iter`
 
 error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
   --> $DIR/array-of-ranges.rs:17:14
@@ -64,9 +64,9 @@ error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
 LL |     for _ in array_of_range {}
    |              ^^^^^^^^^^^^^^ if you meant to iterate between two values, remove the square brackets
    |
-   = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]`
+   = 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 by `std::iter::IntoIterator::into_iter`
+   = note: required by `into_iter`
 
 error[E0277]: `[std::ops::Range<{integer}>; 2]` is not an iterator
   --> $DIR/array-of-ranges.rs:19:14
@@ -74,19 +74,19 @@ error[E0277]: `[std::ops::Range<{integer}>; 2]` is not an iterator
 LL |     for _ in [0..1, 2..3] {}
    |              ^^^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
    |
-   = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 2]`
+   = 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 by `std::iter::IntoIterator::into_iter`
+   = note: required by `into_iter`
 
-error[E0277]: `[std::ops::RangeInclusive<{integer}>; 1]` is not an iterator
+error[E0277]: `[RangeInclusive<{integer}>; 1]` is not an iterator
   --> $DIR/array-of-ranges.rs:21:14
    |
 LL |     for _ in [0..=1] {}
-   |              ^^^^^^^ if you meant to iterate between two values, remove the square brackets
+   |              ^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
    |
-   = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeInclusive<{integer}>; 1]`
-   = note: `[start..=end]` is an array of one `RangeInclusive`; you might have meant to have a `RangeInclusive` without the brackets: `start..=end`
-   = note: required by `std::iter::IntoIterator::into_iter`
+   = 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 by `into_iter`
 
 error: aborting due to 9 previous errors