about summary refs log tree commit diff
path: root/src/test/ui/iterators
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2020-09-07 10:01:45 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2020-10-06 11:19:33 +0100
commit022c148fcd9e4339b4b59dfaee58ca5905d71b2d (patch)
tree78e9598de2e80351e8f50abf57ca9f6c0b74e8c6 /src/test/ui/iterators
parent1db284ecb0039798a09e53a519219c5c556c9b38 (diff)
downloadrust-022c148fcd9e4339b4b59dfaee58ca5905d71b2d.tar.gz
rust-022c148fcd9e4339b4b59dfaee58ca5905d71b2d.zip
Fix tests from rebase
Diffstat (limited to 'src/test/ui/iterators')
-rw-r--r--src/test/ui/iterators/array-of-ranges.stderr9
-rw-r--r--src/test/ui/iterators/array.stderr3
-rw-r--r--src/test/ui/iterators/integral.stderr12
-rw-r--r--src/test/ui/iterators/ranges.stderr2
-rw-r--r--src/test/ui/iterators/string.stderr2
5 files changed, 28 insertions, 0 deletions
diff --git a/src/test/ui/iterators/array-of-ranges.stderr b/src/test/ui/iterators/array-of-ranges.stderr
index 6271d8107bc..601983a6153 100644
--- a/src/test/ui/iterators/array-of-ranges.stderr
+++ b/src/test/ui/iterators/array-of-ranges.stderr
@@ -6,6 +6,7 @@ LL |     for _ in [0..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 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
@@ -16,6 +17,7 @@ LL |     for _ in [0..=1] {}
    |
    = 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
@@ -26,6 +28,7 @@ LL |     for _ in [0..] {}
    |
    = 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
@@ -36,6 +39,7 @@ LL |     for _ in [..1] {}
    |
    = 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
@@ -46,6 +50,7 @@ LL |     for _ in [..=1] {}
    |
    = 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
@@ -56,6 +61,7 @@ LL |     for _ in [start..end] {}
    |
    = 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
@@ -66,6 +72,7 @@ LL |     for _ in array_of_range {}
    |
    = 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
@@ -76,6 +83,7 @@ LL |     for _ in [0..1, 2..3] {}
    |
    = 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
@@ -86,6 +94,7 @@ LL |     for _ in [0..=1] {}
    |
    = 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
diff --git a/src/test/ui/iterators/array.stderr b/src/test/ui/iterators/array.stderr
index f86c82e4917..68c6de5493f 100644
--- a/src/test/ui/iterators/array.stderr
+++ b/src/test/ui/iterators/array.stderr
@@ -6,6 +6,7 @@ LL |     for _ in [1, 2] {}
    |
    = help: the trait `Iterator` is not implemented for `[{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 `[{integer}; 2]`
    = note: required by `into_iter`
 
 error[E0277]: `[{integer}; 2]` is not an iterator
@@ -16,6 +17,7 @@ LL |     for _ in x {}
    |
    = help: the trait `Iterator` is not implemented for `[{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 `[{integer}; 2]`
    = note: required by `into_iter`
 
 error[E0277]: `[{float}; 2]` is not an iterator
@@ -26,6 +28,7 @@ LL |     for _ in [1.0, 2.0] {}
    |
    = help: the trait `Iterator` is not implemented for `[{float}; 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 `[{float}; 2]`
    = note: required by `into_iter`
 
 error: aborting due to 3 previous errors
diff --git a/src/test/ui/iterators/integral.stderr b/src/test/ui/iterators/integral.stderr
index c4c46412611..e31ee59785c 100644
--- a/src/test/ui/iterators/integral.stderr
+++ b/src/test/ui/iterators/integral.stderr
@@ -6,6 +6,7 @@ LL |     for _ in 42 {}
    |
    = help: the trait `Iterator` is not implemented for `{integer}`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required because of the requirements on the impl of `IntoIterator` for `{integer}`
    = note: required by `into_iter`
 
 error[E0277]: `u8` is not an iterator
@@ -16,6 +17,7 @@ LL |     for _ in 42 as u8 {}
    |
    = help: the trait `Iterator` is not implemented for `u8`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required because of the requirements on the impl of `IntoIterator` for `u8`
    = note: required by `into_iter`
 
 error[E0277]: `i8` is not an iterator
@@ -26,6 +28,7 @@ LL |     for _ in 42 as i8 {}
    |
    = help: the trait `Iterator` is not implemented for `i8`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required because of the requirements on the impl of `IntoIterator` for `i8`
    = note: required by `into_iter`
 
 error[E0277]: `u16` is not an iterator
@@ -36,6 +39,7 @@ LL |     for _ in 42 as u16 {}
    |
    = help: the trait `Iterator` is not implemented for `u16`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required because of the requirements on the impl of `IntoIterator` for `u16`
    = note: required by `into_iter`
 
 error[E0277]: `i16` is not an iterator
@@ -46,6 +50,7 @@ LL |     for _ in 42 as i16 {}
    |
    = help: the trait `Iterator` is not implemented for `i16`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required because of the requirements on the impl of `IntoIterator` for `i16`
    = note: required by `into_iter`
 
 error[E0277]: `u32` is not an iterator
@@ -56,6 +61,7 @@ LL |     for _ in 42 as u32 {}
    |
    = help: the trait `Iterator` is not implemented for `u32`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required because of the requirements on the impl of `IntoIterator` for `u32`
    = note: required by `into_iter`
 
 error[E0277]: `i32` is not an iterator
@@ -66,6 +72,7 @@ LL |     for _ in 42 as i32 {}
    |
    = help: the trait `Iterator` is not implemented for `i32`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required because of the requirements on the impl of `IntoIterator` for `i32`
    = note: required by `into_iter`
 
 error[E0277]: `u64` is not an iterator
@@ -76,6 +83,7 @@ LL |     for _ in 42 as u64 {}
    |
    = help: the trait `Iterator` is not implemented for `u64`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required because of the requirements on the impl of `IntoIterator` for `u64`
    = note: required by `into_iter`
 
 error[E0277]: `i64` is not an iterator
@@ -86,6 +94,7 @@ LL |     for _ in 42 as i64 {}
    |
    = help: the trait `Iterator` is not implemented for `i64`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required because of the requirements on the impl of `IntoIterator` for `i64`
    = note: required by `into_iter`
 
 error[E0277]: `usize` is not an iterator
@@ -96,6 +105,7 @@ LL |     for _ in 42 as usize {}
    |
    = help: the trait `Iterator` is not implemented for `usize`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required because of the requirements on the impl of `IntoIterator` for `usize`
    = note: required by `into_iter`
 
 error[E0277]: `isize` is not an iterator
@@ -106,6 +116,7 @@ LL |     for _ in 42 as isize {}
    |
    = help: the trait `Iterator` is not implemented for `isize`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
+   = note: required because of the requirements on the impl of `IntoIterator` for `isize`
    = note: required by `into_iter`
 
 error[E0277]: `{float}` is not an iterator
@@ -115,6 +126,7 @@ LL |     for _ in 42.0 {}
    |              ^^^^ `{float}` is not an iterator
    |
    = help: the trait `Iterator` is not implemented for `{float}`
+   = note: required because of the requirements on the impl of `IntoIterator` for `{float}`
    = note: required by `into_iter`
 
 error: aborting due to 12 previous errors
diff --git a/src/test/ui/iterators/ranges.stderr b/src/test/ui/iterators/ranges.stderr
index 0324d5f1a92..4678bafd196 100644
--- a/src/test/ui/iterators/ranges.stderr
+++ b/src/test/ui/iterators/ranges.stderr
@@ -5,6 +5,7 @@ LL |     for _ in ..10 {}
    |              ^^^^ `RangeTo<{integer}>` is not an iterator
    |
    = help: the trait `Iterator` is not implemented for `RangeTo<{integer}>`
+   = note: required because of the requirements on the impl of `IntoIterator` for `RangeTo<{integer}>`
    = note: required by `into_iter`
 
 error[E0277]: `RangeToInclusive<{integer}>` is not an iterator
@@ -14,6 +15,7 @@ LL |     for _ in ..=10 {}
    |              ^^^^^ `RangeToInclusive<{integer}>` is not an iterator
    |
    = help: the trait `Iterator` is not implemented for `RangeToInclusive<{integer}>`
+   = note: required because of the requirements on the impl of `IntoIterator` for `RangeToInclusive<{integer}>`
    = note: required by `into_iter`
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/iterators/string.stderr b/src/test/ui/iterators/string.stderr
index fecdbd1785f..16530066824 100644
--- a/src/test/ui/iterators/string.stderr
+++ b/src/test/ui/iterators/string.stderr
@@ -5,6 +5,7 @@ LL |     for _ in "".to_owned() {}
    |              ^^^^^^^^^^^^^ `String` is not an iterator
    |
    = help: the trait `Iterator` is not implemented for `String`
+   = note: required because of the requirements on the impl of `IntoIterator` for `String`
    = note: required by `into_iter`
 
 error[E0277]: `&str` is not an iterator
@@ -14,6 +15,7 @@ LL |     for _ in "" {}
    |              ^^ `&str` is not an iterator; try calling `.chars()` or `.bytes()`
    |
    = help: the trait `Iterator` is not implemented for `&str`
+   = note: required because of the requirements on the impl of `IntoIterator` for `&str`
    = note: required by `into_iter`
 
 error: aborting due to 2 previous errors