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