// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. trait Foo { fn foo(&self, a: A) -> A { a } } trait NotRelevant { fn nr(&self, a: A) -> A { a } } struct Bar; impl Foo for Bar {} impl Foo for Bar {} impl NotRelevant for Bar {} fn main() { let f1 = Bar; f1.foo(1usize); //~^ error: the predicate `Bar : Foo` is not satisfied //~| help: the following implementations were found: //~| help: > //~| help: > //~| help: run `rustc --explain E0277` }