2 // Test that the lifetime of the enclosing `&` is used for the object
5 // pretty-expanded FIXME #23616
15 struct SomeStruct<'a> {
20 fn a<'a>(t: &'a dyn Test, mut ss: SomeStruct<'a>) {
24 fn b<'a>(t: &'a dyn Test, mut ss: SomeStruct<'a>) {
28 fn c<'a>(t: &'a (dyn Test+'a), mut ss: SomeStruct<'a>) {
32 fn d<'a>(t: &'a (dyn Test+'a), mut ss: SomeStruct<'a>) {
36 fn e<'a>(_: &'a (dyn Display+'static)) {}
39 // Inside a function body, we can just infer both
40 // lifetimes, to allow &'tmp (Display+'static).
41 e(&0 as &dyn Display);