about summary refs log tree commit diff
path: root/tests/ui/wf/wf-inherent-impl-where-clause.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/wf/wf-inherent-impl-where-clause.rs')
-rw-r--r--tests/ui/wf/wf-inherent-impl-where-clause.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/wf/wf-inherent-impl-where-clause.rs b/tests/ui/wf/wf-inherent-impl-where-clause.rs
new file mode 100644
index 00000000000..ac194fb136d
--- /dev/null
+++ b/tests/ui/wf/wf-inherent-impl-where-clause.rs
@@ -0,0 +1,16 @@
+// Test that we check where-clauses on inherent impls.
+
+#![feature(associated_type_defaults)]
+
+#![allow(dead_code)]
+
+trait ExtraCopy<T:Copy> { }
+
+struct Foo<T,U>(T,U);
+
+impl<T,U> Foo<T,U> where T: ExtraCopy<U> //~ ERROR E0277
+{
+}
+
+
+fn main() { }