#![feature(type_alias_impl_trait)] type Foo = impl Default; #[allow(unused)] fn foo(t: T) -> Foo { t //~^ ERROR: the trait bound `T: Default` is not satisfied } struct NotDefault; fn main() { let _ = Foo::::default(); }