1 // Test that `dyn Bar<Item = XX>` uses `'static` as the default object
2 // lifetime bound for the type `XX`.
7 fn item(&self) -> Box<Self::Item> { panic!() }
12 impl<T> Foo<'_> for T {
16 fn is_static<T>(_: T) where T: 'static { }
18 // Here, we should default to `dyn Bar + 'static`, but the current
19 // code forces us into a conservative, hacky path.
20 fn bar<'a>(x: &'a str) -> &'a dyn Foo<'a, Item = dyn Bar> { &() }
21 //~^ ERROR please supply an explicit bound
24 let s = format!("foo");