@@ -8,28 +8,18 @@ LL | let some_generated_vec = (0..10).collect();
8
8
note: required by a bound in `collect`
9
9
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
10
10
11
- error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
12
- --> $DIR/collect-into-slice.rs:6:30
13
- |
14
- LL | let some_generated_vec = (0..10).collect();
15
- | ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
16
- |
17
- = help: the trait `Sized` is not implemented for `[i32]`
18
- = note: all local variables must have a statically known size
19
- = help: unsized locals are gated as an unstable feature
20
-
21
11
error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
22
12
--> $DIR/collect-into-slice.rs:6:38
23
13
|
24
14
LL | let some_generated_vec = (0..10).collect();
25
15
| ^^^^^^^ doesn't have a size known at compile-time
26
16
|
27
17
= help: the trait `Sized` is not implemented for `[i32]`
28
- note: required by an implicit `Sized` bound in `collect`
29
- --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
18
+ = note: all local variables must have a statically known size
19
+ = help: unsized locals are gated as an unstable feature
30
20
31
21
error[E0277]: a slice of type `&[i32]` cannot be built since we need to store the elements somewhere
32
- --> $DIR/collect-into-slice.rs:18 :38
22
+ --> $DIR/collect-into-slice.rs:15 :38
33
23
|
34
24
LL | let some_generated_vec = (0..10).collect();
35
25
| ^^^^^^^ try explicitly collecting into a `Vec<{integer}>`
@@ -38,6 +28,6 @@ LL | let some_generated_vec = (0..10).collect();
38
28
note: required by a bound in `collect`
39
29
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
40
30
41
- error: aborting due to 4 previous errors
31
+ error: aborting due to 3 previous errors
42
32
43
33
For more information about this error, try `rustc --explain E0277`.
0 commit comments