]>
Commit | Line | Data |
---|---|---|
abe05a73 | 1 | error: expected type, found `10` |
0731742a | 2 | --> $DIR/type-ascription-instead-of-initializer.rs:2:31 |
abe05a73 | 3 | | |
532ac7d7 | 4 | LL | let x: Vec::with_capacity(10, 20); |
416331ca | 5 | | -- ^^ expected type |
abe05a73 XL |
6 | | || |
7 | | |help: use `=` if you meant to assign | |
8 | | while parsing the type for `x` | |
9 | ||
74b04a01 | 10 | error[E0061]: this function takes 1 argument but 2 arguments were supplied |
0731742a | 11 | --> $DIR/type-ascription-instead-of-initializer.rs:2:12 |
abe05a73 | 12 | | |
532ac7d7 | 13 | LL | let x: Vec::with_capacity(10, 20); |
064997fb | 14 | | ^^^^^^^^^^^^^^^^^^ -- argument of type `{integer}` unexpected |
5869c6ff XL |
15 | | |
16 | note: associated function defined here | |
17 | --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL | |
18 | | | |
19 | LL | pub fn with_capacity(capacity: usize) -> Self { | |
20 | | ^^^^^^^^^^^^^ | |
923072b8 FG |
21 | help: remove the extra argument |
22 | | | |
23 | LL | let x: Vec::with_capacity(10); | |
f2b60f7d | 24 | | ~~~~ |
abe05a73 XL |
25 | |
26 | error: aborting due to 2 previous errors | |
27 | ||
0531ce1d | 28 | For more information about this error, try `rustc --explain E0061`. |