]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-ascription-instead-of-initializer.stderr
Auto merge of #99443 - jam1garner:mips-virt-feature, r=nagisa
[rust.git] / src / test / ui / type / type-ascription-instead-of-initializer.stderr
1 error: expected type, found `10`
2   --> $DIR/type-ascription-instead-of-initializer.rs:2:31
3    |
4 LL |     let x: Vec::with_capacity(10, 20);
5    |         --                    ^^ expected type
6    |         ||
7    |         |help: use `=` if you meant to assign
8    |         while parsing the type for `x`
9
10 error[E0061]: this function takes 1 argument but 2 arguments were supplied
11   --> $DIR/type-ascription-instead-of-initializer.rs:2:12
12    |
13 LL |     let x: Vec::with_capacity(10, 20);
14    |            ^^^^^^^^^^^^^^^^^^     -- argument of type `{integer}` unexpected
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    |            ^^^^^^^^^^^^^
21 help: remove the extra argument
22    |
23 LL |     let x: Vec::with_capacity(10);
24    |                              ~~~~
25
26 error: aborting due to 2 previous errors
27
28 For more information about this error, try `rustc --explain E0061`.