]> git.proxmox.com Git - rustc.git/blob - src/test/ui/mismatched_types/overloaded-calls-bad.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / mismatched_types / overloaded-calls-bad.stderr
1 error[E0308]: mismatched types
2 --> $DIR/overloaded-calls-bad.rs:28:17
3 |
4 LL | let ans = s("what");
5 | - ^^^^^^ expected `isize`, found `&str`
6 | |
7 | arguments to this function are incorrect
8 |
9 note: implementation defined here
10 --> $DIR/overloaded-calls-bad.rs:10:1
11 |
12 LL | impl FnMut<(isize,)> for S {
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 error[E0057]: this function takes 1 argument but 0 arguments were supplied
16 --> $DIR/overloaded-calls-bad.rs:29:15
17 |
18 LL | let ans = s();
19 | ^-- an argument of type `isize` is missing
20 |
21 note: implementation defined here
22 --> $DIR/overloaded-calls-bad.rs:10:1
23 |
24 LL | impl FnMut<(isize,)> for S {
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
26 help: provide the argument
27 |
28 LL | let ans = s(/* isize */);
29 | ~~~~~~~~~~~~~~
30
31 error[E0057]: this function takes 1 argument but 2 arguments were supplied
32 --> $DIR/overloaded-calls-bad.rs:31:15
33 |
34 LL | let ans = s("burma", "shave");
35 | ^ ------- ------- argument of type `&'static str` unexpected
36 | |
37 | expected `isize`, found `&str`
38 |
39 note: implementation defined here
40 --> $DIR/overloaded-calls-bad.rs:10:1
41 |
42 LL | impl FnMut<(isize,)> for S {
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
44 help: remove the extra argument
45 |
46 LL | let ans = s(/* isize */);
47 | ~~~~~~~~~~~~~~
48
49 error: aborting due to 3 previous errors
50
51 Some errors have detailed explanations: E0057, E0308.
52 For more information about an error, try `rustc --explain E0057`.