1 // Test that the lifetime from the enclosing `&` is "inherited"
2 // through the `MyBox` struct.
5 #![feature(rustc_error)]
11 struct SomeStruct<'a> {
12 t: &'a MyBox<dyn Test>,
13 u: &'a MyBox<dyn Test + 'a>,
16 struct MyBox<T:?Sized> {
20 fn c<'a>(t: &'a MyBox<dyn Test+'a>, mut ss: SomeStruct<'a>) {
21 ss.t = t; //~ ERROR mismatched types