struct Struct; trait Trait { type Assoc; } impl Trait for Struct { type Assoc = Struct; } fn f(_: &S) where S: Trait {} fn main() { f(&Struct); }