@@ -2,10 +2,7 @@ error[E0277]: the size for values of type `[i32]` cannot be known at compilation
2
2
--> $DIR/slice-issue-87994.rs:3:12
3
3
|
4
4
LL | 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`
9
6
|
10
7
= note: the trait bound `[i32]: IntoIterator` is not satisfied
11
8
= note: required because of the requirements on the impl of `IntoIterator` for `[i32]`
@@ -14,15 +11,18 @@ note: required by `into_iter`
14
11
|
15
12
LL | fn into_iter(self) -> Self::IntoIter;
16
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
+ help: consider borrowing here
15
+ |
16
+ LL | for _ in &v[1..] {
17
+ | ~~~~~~~
18
+ LL | for _ in &mut v[1..] {
19
+ | ~~~~~~~~~~~
17
20
18
21
error[E0277]: `[i32]` is not an iterator
19
22
--> $DIR/slice-issue-87994.rs:3:12
20
23
|
21
24
LL | 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`
26
26
|
27
27
= note: the trait bound `[i32]: IntoIterator` is not satisfied
28
28
= note: required because of the requirements on the impl of `IntoIterator` for `[i32]`
@@ -31,15 +31,18 @@ note: required by `into_iter`
31
31
|
32
32
LL | fn into_iter(self) -> Self::IntoIter;
33
33
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34
+ help: consider borrowing here
35
+ |
36
+ LL | for _ in &v[1..] {
37
+ | ~~~~~~~
38
+ LL | for _ in &mut v[1..] {
39
+ | ~~~~~~~~~~~
34
40
35
41
error[E0277]: the size for values of type `[K]` cannot be known at compilation time
36
42
--> $DIR/slice-issue-87994.rs:11:13
37
43
|
38
44
LL | 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`
43
46
|
44
47
= note: the trait bound `[K]: IntoIterator` is not satisfied
45
48
= note: required because of the requirements on the impl of `IntoIterator` for `[K]`
@@ -48,15 +51,18 @@ note: required by `into_iter`
48
51
|
49
52
LL | fn into_iter(self) -> Self::IntoIter;
50
53
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54
+ help: consider borrowing here
55
+ |
56
+ LL | for i2 in &v2[1..] {
57
+ | ~~~~~~~~
58
+ LL | for i2 in &mut v2[1..] {
59
+ | ~~~~~~~~~~~~
51
60
52
61
error[E0277]: `[K]` is not an iterator
53
62
--> $DIR/slice-issue-87994.rs:11:13
54
63
|
55
64
LL | 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`
60
66
|
61
67
= note: the trait bound `[K]: IntoIterator` is not satisfied
62
68
= note: required because of the requirements on the impl of `IntoIterator` for `[K]`
@@ -65,6 +71,12 @@ note: required by `into_iter`
65
71
|
66
72
LL | fn into_iter(self) -> Self::IntoIter;
67
73
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74
+ help: consider borrowing here
75
+ |
76
+ LL | for i2 in &v2[1..] {
77
+ | ~~~~~~~~
78
+ LL | for i2 in &mut v2[1..] {
79
+ | ~~~~~~~~~~~~
68
80
69
81
error: aborting due to 4 previous errors
70
82
0 commit comments