diff options
Diffstat (limited to 'tests/ui/error-codes/E0119.rs')
-rw-r--r-- | tests/ui/error-codes/E0119.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0119.rs b/tests/ui/error-codes/E0119.rs new file mode 100644 index 000000000..7f89e5a1a --- /dev/null +++ b/tests/ui/error-codes/E0119.rs @@ -0,0 +1,18 @@ +trait MyTrait { + fn get(&self) -> usize; +} + +impl<T> MyTrait for T { + fn get(&self) -> usize { 0 } +} + +struct Foo { + value: usize +} + +impl MyTrait for Foo { //~ ERROR E0119 + fn get(&self) -> usize { self.value } +} + +fn main() { +} |