6 fn get(&self) -> T { panic!() }
9 struct B<'a, T: 'a>(&'a (A<T> + 'a));
11 trait X { fn foo(&self) {} }
13 impl<'a, T> X for B<'a, T> {}
15 fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
17 Box::new(B(&*v)) as Box<dyn X>
18 //~^ ERROR the parameter type `T` may not live long enough
19 //~| ERROR the parameter type `T` may not live long enough
20 //~| ERROR the parameter type `T` may not live long enough
21 //~| ERROR the parameter type `T` may not live long enough
22 //~| ERROR cannot return value referencing local data `*v` [E0515]