diff options
Diffstat (limited to 'tests/ui/methods/method-ambig-two-traits-from-impls2.rs')
-rw-r--r-- | tests/ui/methods/method-ambig-two-traits-from-impls2.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/methods/method-ambig-two-traits-from-impls2.rs b/tests/ui/methods/method-ambig-two-traits-from-impls2.rs new file mode 100644 index 000000000..0a96c1223 --- /dev/null +++ b/tests/ui/methods/method-ambig-two-traits-from-impls2.rs @@ -0,0 +1,16 @@ +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 +} |