// Tests that we probe receivers invariantly when using path-based method lookup. struct B(T); impl B { fn method(self) { println!("hey"); } } fn foo(y: B) { B:: fn(&'a ())>::method(y); //~^ ERROR no function or associated item named `method` found } fn main() {}