2017-12-10 22:47:55 +03:00
|
|
|
error[E0053]: method `foo` has an incompatible type for trait
|
|
|
|
--> $DIR/issue-35869.rs:23:15
|
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
14 | fn foo(_: fn(u8) -> ());
|
2017-12-10 22:47:55 +03:00
|
|
|
| ------------ type in trait
|
|
|
|
...
|
|
|
|
23 | fn foo(_: fn(u16) -> ()) {}
|
|
|
|
| ^^^^^^^^^^^^^ expected u8, found u16
|
|
|
|
|
|
|
|
|
= note: expected type `fn(fn(u8))`
|
|
|
|
found type `fn(fn(u16))`
|
|
|
|
|
|
|
|
error[E0053]: method `bar` has an incompatible type for trait
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/issue-35869.rs:25:15
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
15 | fn bar(_: Option<u8>);
|
2017-12-10 22:47:55 +03:00
|
|
|
| ---------- type in trait
|
|
|
|
...
|
2017-12-10 23:29:24 +03:00
|
|
|
25 | fn bar(_: Option<u16>) {}
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^^^^^^ expected u8, found u16
|
|
|
|
|
|
|
|
|
= note: expected type `fn(std::option::Option<u8>)`
|
|
|
|
found type `fn(std::option::Option<u16>)`
|
|
|
|
|
|
|
|
error[E0053]: method `baz` has an incompatible type for trait
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/issue-35869.rs:27:15
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
16 | fn baz(_: (u8, u16));
|
2017-12-10 22:47:55 +03:00
|
|
|
| --------- type in trait
|
|
|
|
...
|
2017-12-10 23:29:24 +03:00
|
|
|
27 | fn baz(_: (u16, u16)) {}
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^^^^^^^^ expected u8, found u16
|
|
|
|
|
|
|
|
|
= note: expected type `fn((u8, u16))`
|
|
|
|
found type `fn((u16, u16))`
|
|
|
|
|
|
|
|
error[E0053]: method `qux` has an incompatible type for trait
|
2017-12-10 23:29:24 +03:00
|
|
|
--> $DIR/issue-35869.rs:29:17
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
17 | fn qux() -> u8;
|
2017-12-10 22:47:55 +03:00
|
|
|
| -- type in trait
|
|
|
|
...
|
2017-12-10 23:29:24 +03:00
|
|
|
29 | fn qux() -> u16 { 5u16 }
|
2017-12-10 22:47:55 +03:00
|
|
|
| ^^^ expected u8, found u16
|
|
|
|
|
|
|
|
|
= note: expected type `fn() -> u8`
|
|
|
|
found type `fn() -> u16`
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
2018-02-19 21:40:25 +01:00
|
|
|
If you want more information on this error, try using "rustc --explain E0053"
|