//@ revisions: current next //@[next] compile-flags: -Znext-solver //@ check-pass trait Super { type Assoc; } trait Sub: Super {} impl Super for T { type Assoc = i32; } fn illegal(x: &dyn Sub) -> &dyn Super { x } fn main() {}