// check-pass // issue: 114113 // revisions: current next //[next] compile-flags: -Ztrait-solver=next #![feature(trait_upcasting)] trait Mirror { type Assoc; } impl Mirror for T { type Assoc = T; } trait Bar {} trait Foo: Bar<::Assoc> {} fn upcast(x: &dyn Foo) -> &dyn Bar { x } fn main() {}