diff options
Diffstat (limited to 'src/test/ui/mismatched_types/E0053.rs')
-rw-r--r-- | src/test/ui/mismatched_types/E0053.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/mismatched_types/E0053.rs b/src/test/ui/mismatched_types/E0053.rs new file mode 100644 index 000000000..d3146ce54 --- /dev/null +++ b/src/test/ui/mismatched_types/E0053.rs @@ -0,0 +1,16 @@ +trait Foo { + fn foo(x: u16); + fn bar(&self); +} + +struct Bar; + +impl Foo for Bar { + fn foo(x: i16) { } + //~^ ERROR method `foo` has an incompatible type for trait + fn bar(&mut self) { } + //~^ ERROR method `bar` has an incompatible type for trait +} + +fn main() { +} |