summaryrefslogtreecommitdiffstats
path: root/tests/ui/methods/method-ambig-two-traits-from-impls.rs
blob: 22bf840660536c7d489cc9e12b2850b15091a191 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
}