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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
193 B
Rust
Raw Normal View History

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