#![feature(type_alias_impl_trait)] use std::fmt::Debug; fn main() {} type Two = impl Debug; trait Foo { type Bar: Debug; const BAR: Self::Bar; } fn two(t: T, u: U) -> Two { (t, u, T::BAR) //~^ ERROR the trait bound `A: Foo` is not satisfied //~| ERROR `A` doesn't implement `Debug` //~| ERROR `B` doesn't implement `Debug` } fn three(t: T, u: U) -> Two { (t, u, 42) //~^ ERROR `A` doesn't implement `Debug` //~| ERROR `B` doesn't implement `Debug` }