#![feature(type_alias_impl_trait)] use std::fmt::Debug; type Foo = impl Debug; pub trait Yay { } impl Yay for Foo { } fn foo() { is_yay::(); //~ ERROR: the trait bound `u32: Yay` is not satisfied is_debug::(); // OK is_yay::(); // OK is_debug::(); // OK } fn is_yay() { } fn is_debug() { } fn main() {}