rust/tests/ui/methods/method-ambig-two-traits-from-impls2.rs

17 lines
175 B
Rust
Raw Normal View History

trait A { fn foo(); }
trait B { fn foo(); }
struct AB {}
impl A for AB {
fn foo() {}
}
impl B for AB {
fn foo() {}
}
fn main() {
AB::foo(); //~ ERROR E0034
}