mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-09 00:17:44 +00:00
update array missing IntoIterator
msg
This commit is contained in:
parent
5e65467eff
commit
addc51a85f
@ -81,8 +81,8 @@ 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 iterators, but slices like the following are: `&[1, 2, 3]`"
|
||||
label = "arrays do not yet implement `IntoIterator`; try using `std::array::IntoIter::new(arr)`",
|
||||
note = "see <https://github.com/rust-lang/rust/pull/65819> for more details"
|
||||
),
|
||||
on(
|
||||
_Self = "{integral}",
|
||||
|
@ -13,10 +13,10 @@ 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
|
||||
| ^^^^^^^ arrays do not yet implement `IntoIterator`; try using `std::array::IntoIter::new(arr)`
|
||||
|
|
||||
= 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: see <https://github.com/rust-lang/rust/pull/65819> for more details
|
||||
= note: required because of the requirements on the impl of `IntoIterator` for `[RangeInclusive<{integer}>; 1]`
|
||||
= note: required by `into_iter`
|
||||
|
||||
@ -24,10 +24,10 @@ 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
|
||||
| ^^^^^ arrays do not yet implement `IntoIterator`; try using `std::array::IntoIter::new(arr)`
|
||||
|
|
||||
= 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: see <https://github.com/rust-lang/rust/pull/65819> for more details
|
||||
= note: required because of the requirements on the impl of `IntoIterator` for `[RangeFrom<{integer}>; 1]`
|
||||
= note: required by `into_iter`
|
||||
|
||||
@ -35,10 +35,10 @@ 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
|
||||
| ^^^^^ arrays do not yet implement `IntoIterator`; try using `std::array::IntoIter::new(arr)`
|
||||
|
|
||||
= 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: see <https://github.com/rust-lang/rust/pull/65819> for more details
|
||||
= note: required because of the requirements on the impl of `IntoIterator` for `[RangeTo<{integer}>; 1]`
|
||||
= note: required by `into_iter`
|
||||
|
||||
@ -46,10 +46,10 @@ 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
|
||||
| ^^^^^^ arrays do not yet implement `IntoIterator`; try using `std::array::IntoIter::new(arr)`
|
||||
|
|
||||
= 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: see <https://github.com/rust-lang/rust/pull/65819> for more details
|
||||
= note: required because of the requirements on the impl of `IntoIterator` for `[RangeToInclusive<{integer}>; 1]`
|
||||
= note: required by `into_iter`
|
||||
|
||||
@ -79,10 +79,10 @@ 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
|
||||
| ^^^^^^^^^^^^ arrays do not yet implement `IntoIterator`; try using `std::array::IntoIter::new(arr)`
|
||||
|
|
||||
= 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: see <https://github.com/rust-lang/rust/pull/65819> for more details
|
||||
= note: required because of the requirements on the impl of `IntoIterator` for `[std::ops::Range<{integer}>; 2]`
|
||||
= note: required by `into_iter`
|
||||
|
||||
@ -90,10 +90,10 @@ 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
|
||||
| ^^^^^^^ arrays do not yet implement `IntoIterator`; try using `std::array::IntoIter::new(arr)`
|
||||
|
|
||||
= 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: see <https://github.com/rust-lang/rust/pull/65819> for more details
|
||||
= note: required because of the requirements on the impl of `IntoIterator` for `[RangeInclusive<{integer}>; 1]`
|
||||
= note: required by `into_iter`
|
||||
|
||||
|
@ -2,10 +2,10 @@ error[E0277]: `[{integer}; 2]` is not an iterator
|
||||
--> $DIR/array.rs:2:14
|
||||
|
|
||||
LL | for _ in [1, 2] {}
|
||||
| ^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
||||
| ^^^^^^ arrays do not yet implement `IntoIterator`; try using `std::array::IntoIter::new(arr)`
|
||||
|
|
||||
= 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: see <https://github.com/rust-lang/rust/pull/65819> for more details
|
||||
= note: required because of the requirements on the impl of `IntoIterator` for `[{integer}; 2]`
|
||||
= note: required by `into_iter`
|
||||
|
||||
@ -13,10 +13,10 @@ error[E0277]: `[{integer}; 2]` is not an iterator
|
||||
--> $DIR/array.rs:5:14
|
||||
|
|
||||
LL | for _ in x {}
|
||||
| ^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
||||
| ^ arrays do not yet implement `IntoIterator`; try using `std::array::IntoIter::new(arr)`
|
||||
|
|
||||
= 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: see <https://github.com/rust-lang/rust/pull/65819> for more details
|
||||
= note: required because of the requirements on the impl of `IntoIterator` for `[{integer}; 2]`
|
||||
= note: required by `into_iter`
|
||||
|
||||
@ -24,10 +24,10 @@ error[E0277]: `[{float}; 2]` is not an iterator
|
||||
--> $DIR/array.rs:7:14
|
||||
|
|
||||
LL | for _ in [1.0, 2.0] {}
|
||||
| ^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
||||
| ^^^^^^^^^^ arrays do not yet implement `IntoIterator`; try using `std::array::IntoIter::new(arr)`
|
||||
|
|
||||
= 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: see <https://github.com/rust-lang/rust/pull/65819> for more details
|
||||
= note: required because of the requirements on the impl of `IntoIterator` for `[{float}; 2]`
|
||||
= note: required by `into_iter`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user