]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-14285.rs
Rollup merge of #107152 - GuillaumeGomez:migrate-to-css-var, r=notriddle
[rust.git] / tests / ui / issues / issue-14285.rs
1 trait Foo {
2     fn dummy(&self) { }
3 }
4
5 struct A;
6
7 impl Foo for A {}
8
9 struct B<'a>(&'a (dyn Foo + 'a));
10
11 fn foo<'a>(a: &dyn Foo) -> B<'a> {
12     B(a)    //~ ERROR explicit lifetime required in the type of `a` [E0621]
13 }
14
15 fn main() {
16     let _test = foo(&A);
17 }