1 // Test that the lifetime from the enclosing `&` is "inherited"
2 // through the `Box` struct.
4 // pretty-expanded FIXME #23616
12 struct SomeStruct<'a> {
14 u: &'a Box<dyn Test+'a>,
17 fn a<'a>(t: &'a Box<dyn Test>, mut ss: SomeStruct<'a>) {
21 fn b<'a>(t: &'a Box<dyn Test>, mut ss: SomeStruct<'a>) {
25 // see also compile-fail/object-lifetime-default-from-rptr-box-error.rs
27 fn d<'a>(t: &'a Box<dyn Test+'a>, mut ss: SomeStruct<'a>) {