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