// compile-flags: -Znext-solver // check-pass #![feature(trait_upcasting)] trait Foo: Bar + Bar {} trait Bar {} fn main() { let x: &dyn Foo = todo!(); let y: &dyn Bar = x; let z: &dyn Bar = x; }