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 fn is_static<T>(_: T) where T: 'static { }
14 // Here, we should default to `dyn Bar + 'static`, but the current
15 // code forces us into a conservative, hacky path.
16 fn bar(x: &str) -> &dyn Foo<Item = dyn Bar> { &() }
17 //~^ ERROR please supply an explicit bound
20 let s = format!("foo");