]>
Commit | Line | Data |
---|---|---|
85aaf69f SL |
1 | trait Foo { |
2 | fn dummy(&self) { } | |
3 | } | |
223e47cc | 4 | |
1a4d82fc | 5 | struct A; |
223e47cc | 6 | |
1a4d82fc JJ |
7 | impl Foo for A {} |
8 | ||
dc9dc135 | 9 | struct B<'a>(&'a (dyn Foo + 'a)); |
223e47cc | 10 | |
dc9dc135 | 11 | fn foo<'a>(a: &dyn Foo) -> B<'a> { |
0731742a | 12 | B(a) //~ ERROR explicit lifetime required in the type of `a` [E0621] |
223e47cc LB |
13 | } |
14 | ||
15 | fn main() { | |
1a4d82fc | 16 | let _test = foo(&A); |
223e47cc | 17 | } |