blob: 2bff01be9b813a4e515297abd07d9cd9a14747f8 [file] [log] [blame]
trait Foo<A> {
fn foo(&self, a: A) -> A {
a
}
}
trait NotRelevant<A> {
fn nr(&self, a: A) -> A {
a
}
}
struct Bar;
impl NotRelevant<usize> for Bar {}
fn main() {
let f1 = Bar;
f1.foo(1usize);
//~^ error: method named `foo` found for type `Bar` in the current scope
}