//@ compile-flags: -Znext-solver trait Foo: Bar + Bar {} trait Bar {} fn main() { let x: &dyn Foo = todo!(); let y: &dyn Bar = x; //~^ ERROR mismatched types }