#![feature(type_alias_impl_trait)] type Foo = impl std::fmt::Debug; type Bar = impl Trait; trait Trait {} impl Trait for U {} fn bar() -> Bar { 42 } fn main() { println!("{:?}", bar()); //~^ ERROR `Bar` doesn't implement `Debug` }