rust/src/test/compile-fail/ambig_impl_bounds.rs

10 lines
252 B
Rust
Raw Normal View History

iface A { fn foo(); }
iface B { fn foo(); }
fn foo<T: A B>(t: T) {
t.foo(); //~ ERROR multiple applicable methods in scope
//~^ NOTE candidate #1 derives from the bound `A`
//~^^ NOTE candidate #2 derives from the bound `B`
}
fn main() {}