2 // Test that the lifetime from the enclosing `&` is "inherited"
3 // through the `MyBox` struct.
5 // pretty-expanded FIXME #23616
13 struct SomeStruct<'a> {
14 t: &'a MyBox<dyn Test>,
15 u: &'a MyBox<dyn Test+'a>,
18 struct MyBox<T:?Sized> {
22 fn a<'a>(t: &'a MyBox<dyn Test>, mut ss: SomeStruct<'a>) {
26 fn b<'a>(t: &'a MyBox<dyn Test>, mut ss: SomeStruct<'a>) {
30 // see also ui/object-lifetime/object-lifetime-default-from-rptr-box-error.rs
32 fn d<'a>(t: &'a MyBox<dyn Test+'a>, mut ss: SomeStruct<'a>) {