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