@@ -32,6 +32,40 @@ note: required by `into_iter`
32
32
LL | fn into_iter(self) -> Self::IntoIter;
33
33
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34
34
35
- error: aborting due to 2 previous errors
35
+ error[E0277]: the size for values of type `[K]` cannot be known at compilation time
36
+ --> $DIR/slice-issue-87994.rs:11:13
37
+ |
38
+ LL | for i2 in v2[1..] {
39
+ | ^^^^^^^
40
+ | |
41
+ | expected an implementor of trait `IntoIterator`
42
+ | help: consider borrowing here: `&v2[1..]`
43
+ |
44
+ = note: the trait bound `[K]: IntoIterator` is not satisfied
45
+ = note: required because of the requirements on the impl of `IntoIterator` for `[K]`
46
+ note: required by `into_iter`
47
+ --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
48
+ |
49
+ LL | fn into_iter(self) -> Self::IntoIter;
50
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51
+
52
+ error[E0277]: `[K]` is not an iterator
53
+ --> $DIR/slice-issue-87994.rs:11:13
54
+ |
55
+ LL | for i2 in v2[1..] {
56
+ | ^^^^^^^
57
+ | |
58
+ | expected an implementor of trait `IntoIterator`
59
+ | help: consider borrowing here: `&v2[1..]`
60
+ |
61
+ = note: the trait bound `[K]: IntoIterator` is not satisfied
62
+ = note: required because of the requirements on the impl of `IntoIterator` for `[K]`
63
+ note: required by `into_iter`
64
+ --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
65
+ |
66
+ LL | fn into_iter(self) -> Self::IntoIter;
67
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68
+
69
+ error: aborting due to 4 previous errors
36
70
37
71
For more information about this error, try `rustc --explain E0277`.
0 commit comments