]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type/type-ascription-instead-of-initializer.stderr
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / type / type-ascription-instead-of-initializer.stderr
CommitLineData
abe05a73 1error: expected type, found `10`
0731742a 2 --> $DIR/type-ascription-instead-of-initializer.rs:2:31
abe05a73 3 |
532ac7d7 4LL | 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 10error[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 13LL | let x: Vec::with_capacity(10, 20);
064997fb 14 | ^^^^^^^^^^^^^^^^^^ -- argument of type `{integer}` unexpected
5869c6ff
XL
15 |
16note: associated function defined here
17 --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
18 |
19LL | pub fn with_capacity(capacity: usize) -> Self {
20 | ^^^^^^^^^^^^^
923072b8
FG
21help: remove the extra argument
22 |
23LL | let x: Vec::with_capacity(10);
f2b60f7d 24 | ~~~~
abe05a73
XL
25
26error: aborting due to 2 previous errors
27
0531ce1d 28For more information about this error, try `rustc --explain E0061`.