//@ compile-flags: -Znext-solver //@ check-pass // Regression test for . // Exercises a case where structural equality is insufficient when replacing projections in a dyn's // bounds. In this case, the bound will contain `:Assoc>::Assoc`, but // the existential projections from the dyn will have `>::Assoc` because as an // optimization we eagerly normalize aliases in goals. trait Other {} impl Other for T {} trait Super { type Assoc; } trait Mirror { type Assoc; } impl Mirror for T { type Assoc = T; } trait Foo: Super<::Assoc, Assoc = A> { type FooAssoc: Other<::Assoc>>::Assoc>; } fn is_foo + ?Sized, T, U>() {} fn main() { is_foo::, _, _>(); }