//@ check-pass // issue: 114113 //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver #![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() {}