summary refs log tree commit diff
path: root/src/test/ui/issues/issue-14285.rs
blob: 934d72a67ca1937457ad2d98df45754c1d76bd7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);
}