// This used to ICE in an earlier iteration of #117164. Minimized from crate `proqnt`. //@ check-pass //@ revisions: classic next //@[next] compile-flags: -Znext-solver //@ aux-crate:dep=trait-with-assoc-ty.rs //@ edition: 2021 pub(crate) trait Trait { type Assoc; } pub(crate) struct Type(T, U, V); impl dep::Trait for Type::Assoc as Trait>::Assoc, U> where T: dep::Trait, ::Assoc: Trait, { type Assoc = U; } fn main() {}