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