Fix grammar in compiler error for array iterators

This commit is contained in:
Matthew Russell 2018-12-17 02:27:41 +00:00
parent a8a2a887d0
commit fca03e0140
3 changed files with 5 additions and 5 deletions

View file

@ -87,7 +87,7 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item=()>) {}
on(
_Self="[]",
label="borrow the array with `&` or call `.iter()` on it to iterate over it",
note="arrays are not an iterators, but slices like the following are: `&[1, 2, 3]`"
note="arrays are not iterators, but slices like the following are: `&[1, 2, 3]`"
),
on(
_Self="{integral}",

View file

@ -75,7 +75,7 @@ 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]`
= note: arrays are not an iterators, but slices like the following are: `&[1, 2, 3]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required by `std::iter::IntoIterator::into_iter`
error[E0277]: `[std::ops::RangeInclusive<{integer}>; 1]` is not an iterator

View file

@ -5,7 +5,7 @@ LL | for _ in [1, 2] {}
| ^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `std::iter::Iterator` is not implemented for `[{integer}; 2]`
= note: arrays are not an iterators, but slices like the following are: `&[1, 2, 3]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required by `std::iter::IntoIterator::into_iter`
error[E0277]: `[{integer}; 2]` is not an iterator
@ -15,7 +15,7 @@ LL | for _ in x {}
| ^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `std::iter::Iterator` is not implemented for `[{integer}; 2]`
= note: arrays are not an iterators, but slices like the following are: `&[1, 2, 3]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required by `std::iter::IntoIterator::into_iter`
error[E0277]: `[{float}; 2]` is not an iterator
@ -25,7 +25,7 @@ LL | for _ in [1.0, 2.0] {}
| ^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `std::iter::Iterator` is not implemented for `[{float}; 2]`
= note: arrays are not an iterators, but slices like the following are: `&[1, 2, 3]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required by `std::iter::IntoIterator::into_iter`
error: aborting due to 3 previous errors