diff options
Diffstat (limited to 'src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.rs')
-rw-r--r-- | src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.rs b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.rs new file mode 100644 index 000000000..73e1789f2 --- /dev/null +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.rs @@ -0,0 +1,10 @@ +trait Foo { + fn foo<'a>(x: &mut Vec<&u8>, y: &u8); +} +impl Foo for () { + fn foo(x: &mut Vec<&u8>, y: &u8) { + x.push(y); + //~^ ERROR lifetime may not live long enough + } +} +fn main() {} |