]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / lifetimes / lifetime-elision-return-type-requires-explicit-lifetime.rs
index 7a2eba518fefa52428c6c1c29cd78ef0a0921232..d0a8fe795efd03549df1ec44ac889d45a8a0d506 100644 (file)
@@ -42,4 +42,10 @@ fn k<'a, T: WithLifetime<'a>>(_x: T::Output) -> &isize {
     panic!()
 }
 
+fn l<'a>(_: &'a str, _: &'a str) -> &str { "" }
+//~^ ERROR missing lifetime specifier
+
+// This is ok because both `'a` are for the same parameter.
+fn m<'a>(_: &'a Foo<'a>) -> &str { "" }
+
 fn main() {}