//! Check that we consider `Bar` to successfully unify //! with both `Bar` and `Bar` (in isolation), so we bail //! out with ambiguity. //@ revisions: current next //@[next] compile-flags: -Znext-solver struct Bar(T); impl Bar { fn bar(self) {} } impl Bar { fn bar(self) {} } fn foo(x: bool) -> Bar { if x { let x = foo(false); x.bar(); //~^ ERROR: multiple applicable items in scope } todo!() } fn main() {}