]> git.lizzy.rs Git - rust.git/blob - src/test/ui/argument-suggestions/issue-97484.stderr
Rollup merge of #100031 - GoldsteinE:try-removing-the-field, r=michaelwoerister
[rust.git] / src / test / ui / argument-suggestions / issue-97484.stderr
1 error[E0061]: this function takes 4 arguments but 7 arguments were supplied
2   --> $DIR/issue-97484.rs:12:5
3    |
4 LL |     foo(&&A, B, C, D, E, F, G);
5    |     ^^^      -  -     -  - argument of type `F` unexpected
6    |              |  |     |
7    |              |  |     expected `&E`, found struct `E`
8    |              |  argument of type `C` unexpected
9    |              argument of type `B` unexpected
10    |
11 note: function defined here
12   --> $DIR/issue-97484.rs:9:4
13    |
14 LL | fn foo(a: &A, d: D, e: &E, g: G) {}
15    |    ^^^ -----  ----  -----  ----
16 help: consider borrowing here
17    |
18 LL |     foo(&&A, B, C, D, &E, F, G);
19    |                       ~~
20 help: remove the extra arguments
21    |
22 LL |     foo(&&A, D, /* &E */, G);
23    |     ~~~~~~~~~~~~~~~~~~~~~~~~
24
25 error: aborting due to previous error
26
27 For more information about this error, try `rustc --explain E0061`.