trait Trait { type AssociatedType; } fn foo(t: T) where T: Trait { println!("in foo"); } impl Trait for i8 { type AssociatedType = &'static str; } fn main() { foo(3_i8); //~ ERROR E0271 }