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