1 // Test that the lifetime from the enclosing `&` is "inherited"
2 // through the `MyBox` struct.
10 struct SomeStruct<'a> {
11 t: &'a MyBox<dyn Test>,
12 u: &'a MyBox<dyn Test + 'a>,
15 struct MyBox<T:?Sized> {
19 fn c<'a>(t: &'a MyBox<dyn Test+'a>, mut ss: SomeStruct<'a>) {
21 //~^ ERROR lifetime may not live long enough