]> git.lizzy.rs Git - rust.git/blob - src/test/ui/iterators/collect-into-slice.stderr
Auto merge of #100845 - timvermeulen:iter_compare, r=scottmcm
[rust.git] / src / test / ui / iterators / collect-into-slice.stderr
1 error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
2   --> $DIR/collect-into-slice.rs:8:9
3    |
4 LL |     let some_generated_vec = (0..10).collect();
5    |         ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
6    |
7    = help: the trait `Sized` is not implemented for `[i32]`
8    = note: all local variables must have a statically known size
9    = help: unsized locals are gated as an unstable feature
10
11 error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
12   --> $DIR/collect-into-slice.rs:8:38
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: required by a bound in `collect`
19   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
20    |
21 LL |     fn collect<B: FromIterator<Self::Item>>(self) -> B
22    |                ^ required by this bound in `collect`
23
24 error[E0277]: a slice of type `[i32]` cannot be built since `[i32]` has no definite size
25   --> $DIR/collect-into-slice.rs:8:30
26    |
27 LL |     let some_generated_vec = (0..10).collect();
28    |                              ^^^^^^^ ------- required by a bound introduced by this call
29    |                              |
30    |                              try explicitly collecting into a `Vec<{integer}>`
31    |
32    = help: the trait `FromIterator<{integer}>` is not implemented for `[i32]`
33 note: required by a bound in `collect`
34   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
35    |
36 LL |     fn collect<B: FromIterator<Self::Item>>(self) -> B
37    |                   ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect`
38
39 error: aborting due to 3 previous errors
40
41 For more information about this error, try `rustc --explain E0277`.