rust/src/test/ui/issues/issue-14285.rs
2018-12-25 21:08:33 -07:00

18 lines
247 B
Rust

trait Foo {
fn dummy(&self) { }
}
struct A;
impl Foo for A {}
struct B<'a>(&'a (Foo+'a));
fn foo<'a>(a: &Foo) -> B<'a> {
B(a) //~ ERROR explicit lifetime required in the type of `a` [E0621]
}
fn main() {
let _test = foo(&A);
}