]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-35869.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-35869.rs
1 trait Foo {
2 fn foo(_: fn(u8) -> ());
3 fn bar(_: Option<u8>);
4 fn baz(_: (u8, u16));
5 fn qux() -> u8;
6 }
7
8 struct Bar;
9
10 impl Foo for Bar {
11 fn foo(_: fn(u16) -> ()) {}
12 //~^ ERROR method `foo` has an incompatible type for trait
13 fn bar(_: Option<u16>) {}
14 //~^ ERROR method `bar` has an incompatible type for trait
15 fn baz(_: (u16, u16)) {}
16 //~^ ERROR method `baz` has an incompatible type for trait
17 fn qux() -> u16 { 5u16 }
18 //~^ ERROR method `qux` has an incompatible type for trait
19 }
20
21 fn main() {}