1 // Test that `impl Alpha<dyn Object>` resets the object-lifetime
2 // default to `'static`.
6 trait Alpha<Item: ?Sized> {
7 fn item(&self) -> Box<Item> {
13 impl<T> Alpha<dyn Object> for T {}
14 fn alpha(x: &str, y: &str) -> impl Alpha<dyn Object> { () }
15 fn is_static<T>(_: T) where T: 'static { }
17 fn bar(x: &str) -> &impl Alpha<dyn Object> { &() }
20 let s = format!("foo");