@@ -2,10 +2,7 @@ error[E0277]: the size for values of type `[i32]` cannot be known at compilation
22 --> $DIR/slice-issue-87994.rs:3:12
33 |
44LL | for _ in v[1..] {
5- | ^^^^^^
6- | |
7- | expected an implementor of trait `IntoIterator`
8- | help: consider borrowing here: `&v[1..]`
5+ | ^^^^^^ expected an implementor of trait `IntoIterator`
96 |
107 = note: the trait bound `[i32]: IntoIterator` is not satisfied
118 = note: required because of the requirements on the impl of `IntoIterator` for `[i32]`
@@ -14,15 +11,18 @@ note: required by `into_iter`
1411 |
1512LL | fn into_iter(self) -> Self::IntoIter;
1613 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14+ help: consider borrowing here
15+ |
16+ LL | for _ in &v[1..] {
17+ | ~~~~~~~
18+ LL | for _ in &mut v[1..] {
19+ | ~~~~~~~~~~~
1720
1821error[E0277]: `[i32]` is not an iterator
1922 --> $DIR/slice-issue-87994.rs:3:12
2023 |
2124LL | for _ in v[1..] {
22- | ^^^^^^
23- | |
24- | expected an implementor of trait `IntoIterator`
25- | help: consider borrowing here: `&v[1..]`
25+ | ^^^^^^ expected an implementor of trait `IntoIterator`
2626 |
2727 = note: the trait bound `[i32]: IntoIterator` is not satisfied
2828 = note: required because of the requirements on the impl of `IntoIterator` for `[i32]`
@@ -31,15 +31,18 @@ note: required by `into_iter`
3131 |
3232LL | fn into_iter(self) -> Self::IntoIter;
3333 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34+ help: consider borrowing here
35+ |
36+ LL | for _ in &v[1..] {
37+ | ~~~~~~~
38+ LL | for _ in &mut v[1..] {
39+ | ~~~~~~~~~~~
3440
3541error[E0277]: the size for values of type `[K]` cannot be known at compilation time
3642 --> $DIR/slice-issue-87994.rs:11:13
3743 |
3844LL | for i2 in v2[1..] {
39- | ^^^^^^^
40- | |
41- | expected an implementor of trait `IntoIterator`
42- | help: consider borrowing here: `&v2[1..]`
45+ | ^^^^^^^ expected an implementor of trait `IntoIterator`
4346 |
4447 = note: the trait bound `[K]: IntoIterator` is not satisfied
4548 = note: required because of the requirements on the impl of `IntoIterator` for `[K]`
@@ -48,15 +51,18 @@ note: required by `into_iter`
4851 |
4952LL | fn into_iter(self) -> Self::IntoIter;
5053 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54+ help: consider borrowing here
55+ |
56+ LL | for i2 in &v2[1..] {
57+ | ~~~~~~~~
58+ LL | for i2 in &mut v2[1..] {
59+ | ~~~~~~~~~~~~
5160
5261error[E0277]: `[K]` is not an iterator
5362 --> $DIR/slice-issue-87994.rs:11:13
5463 |
5564LL | for i2 in v2[1..] {
56- | ^^^^^^^
57- | |
58- | expected an implementor of trait `IntoIterator`
59- | help: consider borrowing here: `&v2[1..]`
65+ | ^^^^^^^ expected an implementor of trait `IntoIterator`
6066 |
6167 = note: the trait bound `[K]: IntoIterator` is not satisfied
6268 = note: required because of the requirements on the impl of `IntoIterator` for `[K]`
@@ -65,6 +71,12 @@ note: required by `into_iter`
6571 |
6672LL | fn into_iter(self) -> Self::IntoIter;
6773 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74+ help: consider borrowing here
75+ |
76+ LL | for i2 in &v2[1..] {
77+ | ~~~~~~~~
78+ LL | for i2 in &mut v2[1..] {
79+ | ~~~~~~~~~~~~
6880
6981error: aborting due to 4 previous errors
7082
0 commit comments