]>
Commit | Line | Data |
---|---|---|
ff7c6d11 | 1 | error[E0053]: method `foo` has an incompatible type for trait |
0731742a | 2 | --> $DIR/issue-35869.rs:11:15 |
ff7c6d11 | 3 | | |
0531ce1d | 4 | LL | fn foo(_: fn(u8) -> ()); |
ff7c6d11 XL |
5 | | ------------ type in trait |
6 | ... | |
0531ce1d | 7 | LL | fn foo(_: fn(u16) -> ()) {} |
cdc7bbd5 XL |
8 | | ^^^^^^^^^^^^^ |
9 | | | | |
10 | | expected `u8`, found `u16` | |
11 | | help: change the parameter type to match the trait: `fn(u8)` | |
ff7c6d11 | 12 | | |
60c5eb7d XL |
13 | = note: expected fn pointer `fn(fn(u8))` |
14 | found fn pointer `fn(fn(u16))` | |
ff7c6d11 XL |
15 | |
16 | error[E0053]: method `bar` has an incompatible type for trait | |
0731742a | 17 | --> $DIR/issue-35869.rs:13:15 |
ff7c6d11 | 18 | | |
0531ce1d | 19 | LL | fn bar(_: Option<u8>); |
ff7c6d11 XL |
20 | | ---------- type in trait |
21 | ... | |
0531ce1d | 22 | LL | fn bar(_: Option<u16>) {} |
cdc7bbd5 XL |
23 | | ^^^^^^^^^^^ |
24 | | | | |
25 | | expected `u8`, found `u16` | |
26 | | help: change the parameter type to match the trait: `Option<u8>` | |
ff7c6d11 | 27 | | |
1b1a35ee XL |
28 | = note: expected fn pointer `fn(Option<u8>)` |
29 | found fn pointer `fn(Option<u16>)` | |
ff7c6d11 XL |
30 | |
31 | error[E0053]: method `baz` has an incompatible type for trait | |
0731742a | 32 | --> $DIR/issue-35869.rs:15:15 |
ff7c6d11 | 33 | | |
0531ce1d | 34 | LL | fn baz(_: (u8, u16)); |
ff7c6d11 XL |
35 | | --------- type in trait |
36 | ... | |
0531ce1d | 37 | LL | fn baz(_: (u16, u16)) {} |
cdc7bbd5 XL |
38 | | ^^^^^^^^^^ |
39 | | | | |
40 | | expected `u8`, found `u16` | |
41 | | help: change the parameter type to match the trait: `(u8, u16)` | |
ff7c6d11 | 42 | | |
60c5eb7d XL |
43 | = note: expected fn pointer `fn((u8, _))` |
44 | found fn pointer `fn((u16, _))` | |
ff7c6d11 XL |
45 | |
46 | error[E0053]: method `qux` has an incompatible type for trait | |
0731742a | 47 | --> $DIR/issue-35869.rs:17:17 |
ff7c6d11 | 48 | | |
0531ce1d | 49 | LL | fn qux() -> u8; |
ff7c6d11 XL |
50 | | -- type in trait |
51 | ... | |
0531ce1d | 52 | LL | fn qux() -> u16 { 5u16 } |
cdc7bbd5 XL |
53 | | ^^^ |
54 | | | | |
55 | | expected `u8`, found `u16` | |
56 | | help: change the output type to match the trait: `u8` | |
ff7c6d11 | 57 | | |
60c5eb7d XL |
58 | = note: expected fn pointer `fn() -> u8` |
59 | found fn pointer `fn() -> u16` | |
ff7c6d11 XL |
60 | |
61 | error: aborting due to 4 previous errors | |
62 | ||
0531ce1d | 63 | For more information about this error, try `rustc --explain E0053`. |