1 error[E0053]: method `foo` has an incompatible type for trait
2 --> $DIR/issue-35869.rs:11:15
4 LL | fn foo(_: fn(u16) -> ()) {}
7 | expected `u8`, found `u16`
8 | help: change the parameter type to match the trait: `fn(u8)`
11 --> $DIR/issue-35869.rs:2:15
13 LL | fn foo(_: fn(u8) -> ());
15 = note: expected fn pointer `fn(fn(u8))`
16 found fn pointer `fn(fn(u16))`
18 error[E0053]: method `bar` has an incompatible type for trait
19 --> $DIR/issue-35869.rs:13:15
21 LL | fn bar(_: Option<u16>) {}
24 | expected `u8`, found `u16`
25 | help: change the parameter type to match the trait: `Option<u8>`
28 --> $DIR/issue-35869.rs:3:15
30 LL | fn bar(_: Option<u8>);
32 = note: expected fn pointer `fn(Option<u8>)`
33 found fn pointer `fn(Option<u16>)`
35 error[E0053]: method `baz` has an incompatible type for trait
36 --> $DIR/issue-35869.rs:15:15
38 LL | fn baz(_: (u16, u16)) {}
41 | expected `u8`, found `u16`
42 | help: change the parameter type to match the trait: `(u8, u16)`
45 --> $DIR/issue-35869.rs:4:15
47 LL | fn baz(_: (u8, u16));
49 = note: expected fn pointer `fn((u8, _))`
50 found fn pointer `fn((u16, _))`
52 error[E0053]: method `qux` has an incompatible type for trait
53 --> $DIR/issue-35869.rs:17:17
55 LL | fn qux() -> u16 { 5u16 }
58 | expected `u8`, found `u16`
59 | help: change the output type to match the trait: `u8`
62 --> $DIR/issue-35869.rs:5:17
66 = note: expected fn pointer `fn() -> u8`
67 found fn pointer `fn() -> u16`
69 error: aborting due to 4 previous errors
71 For more information about this error, try `rustc --explain E0053`.