//@ known-bug: #102047 struct Ty1; struct Ty2; pub trait Trait {} pub trait WithAssoc1<'a> { type Assoc; } pub trait WithAssoc2<'a> { type Assoc; } impl Trait fn(>::Assoc, >::Assoc)> for (T, U) where T: for<'a> WithAssoc1<'a> + for<'a> WithAssoc2<'a, Assoc = i32>, U: for<'a> WithAssoc2<'a>, { } impl WithAssoc1<'_> for Ty1 { type Assoc = (); } impl WithAssoc2<'_> for Ty1 { type Assoc = i32; } impl WithAssoc1<'_> for Ty2 { type Assoc = (); } impl WithAssoc2<'_> for Ty2 { type Assoc = u32; } fn foo() where T: for<'a> WithAssoc1<'a>, U: for<'a> WithAssoc2<'a>, (T, U): Trait, { } fn main() { foo::(); }