]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/overloaded-calls-bad.stderr
Rollup merge of #105526 - Xiretza:iter-from-generator-derive, r=scottmcm
[rust.git] / tests / ui / mismatched_types / overloaded-calls-bad.stderr
1 error[E0308]: mismatched types
2   --> $DIR/overloaded-calls-bad.rs:33: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:35: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:37: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[E0308]: mismatched types
50   --> $DIR/overloaded-calls-bad.rs:40:7
51    |
52 LL |     F("");
53    |     - ^^ expected `i32`, found `&str`
54    |     |
55    |     arguments to this struct are incorrect
56    |
57 note: implementation defined here
58   --> $DIR/overloaded-calls-bad.rs:25:1
59    |
60 LL | impl FnOnce<(i32,)> for F {
61    | ^^^^^^^^^^^^^^^^^^^^^^^^^
62
63 error: aborting due to 4 previous errors
64
65 Some errors have detailed explanations: E0057, E0308.
66 For more information about an error, try `rustc --explain E0057`.