summaryrefslogtreecommitdiffstats
path: root/src/test/ui/methods/method-ambig-two-traits-from-bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/methods/method-ambig-two-traits-from-bounds.rs')
-rw-r--r--src/test/ui/methods/method-ambig-two-traits-from-bounds.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/methods/method-ambig-two-traits-from-bounds.rs b/src/test/ui/methods/method-ambig-two-traits-from-bounds.rs
new file mode 100644
index 000000000..e3cc5557f
--- /dev/null
+++ b/src/test/ui/methods/method-ambig-two-traits-from-bounds.rs
@@ -0,0 +1,8 @@
+trait A { fn foo(&self); }
+trait B { fn foo(&self); }
+
+fn foo<T:A + B>(t: T) {
+ t.foo(); //~ ERROR E0034
+}
+
+fn main() {}