//! 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 { //[current]~^ ERROR: cycle if x { let x = foo(false); x.bar(); //[current]~^ ERROR: no method named `bar` //[next]~^^ ERROR: multiple applicable items in scope } todo!() } fn main() {}