1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#![feature(type_alias_impl_trait)] use std::fmt::Debug; type Foo = impl Debug; pub trait Yay { } impl Yay for u32 { } fn foo() { is_yay::<Foo>(); //~ ERROR: the trait bound `Foo: Yay` is not satisfied } fn is_yay<T: Yay>() { } fn main() {}