rust/src/test/compile-fail/ambig_impl_bounds.rs
2012-05-25 17:04:05 -07:00

10 lines
252 B
Rust

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() {}