1 error[E0053]: method `foo` has an incompatible type for trait
2 --> $DIR/issue-35869.rs:11:15
4 LL | fn foo(_: fn(u8) -> ());
5 | ------------ type in trait
7 LL | fn foo(_: fn(u16) -> ()) {}
8 | ^^^^^^^^^^^^^ expected u8, found u16
10 = note: expected type `fn(fn(u8))`
11 found type `fn(fn(u16))`
13 error[E0053]: method `bar` has an incompatible type for trait
14 --> $DIR/issue-35869.rs:13:15
16 LL | fn bar(_: Option<u8>);
17 | ---------- type in trait
19 LL | fn bar(_: Option<u16>) {}
20 | ^^^^^^^^^^^ expected u8, found u16
22 = note: expected type `fn(std::option::Option<u8>)`
23 found type `fn(std::option::Option<u16>)`
25 error[E0053]: method `baz` has an incompatible type for trait
26 --> $DIR/issue-35869.rs:15:15
28 LL | fn baz(_: (u8, u16));
29 | --------- type in trait
31 LL | fn baz(_: (u16, u16)) {}
32 | ^^^^^^^^^^ expected u8, found u16
34 = note: expected type `fn((u8, u16))`
35 found type `fn((u16, u16))`
37 error[E0053]: method `qux` has an incompatible type for trait
38 --> $DIR/issue-35869.rs:17:17
43 LL | fn qux() -> u16 { 5u16 }
44 | ^^^ expected u8, found u16
46 = note: expected type `fn() -> u8`
47 found type `fn() -> u16`
49 error: aborting due to 4 previous errors
51 For more information about this error, try `rustc --explain E0053`.