diff options
Diffstat (limited to 'tests/ui/error-codes/E0195.rs')
-rw-r--r-- | tests/ui/error-codes/E0195.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0195.rs b/tests/ui/error-codes/E0195.rs new file mode 100644 index 000000000..f712ee42b --- /dev/null +++ b/tests/ui/error-codes/E0195.rs @@ -0,0 +1,15 @@ +trait Trait { + fn bar<'a,'b:'a>(x: &'a str, y: &'b str); + //~^ NOTE lifetimes in impl do not match this method in trait +} + +struct Foo; + +impl Trait for Foo { + fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195 + //~^ NOTE lifetimes do not match method in trait + } +} + +fn main() { +} |