summaryrefslogtreecommitdiffstats
path: root/src/test/ui/wf/wf-in-fn-where-clause.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/wf/wf-in-fn-where-clause.rs')
-rw-r--r--src/test/ui/wf/wf-in-fn-where-clause.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/wf/wf-in-fn-where-clause.rs b/src/test/ui/wf/wf-in-fn-where-clause.rs
new file mode 100644
index 000000000..e55295a3b
--- /dev/null
+++ b/src/test/ui/wf/wf-in-fn-where-clause.rs
@@ -0,0 +1,15 @@
+// Check that we enforce WF conditions also for where clauses in fn items.
+
+
+#![allow(dead_code)]
+
+trait MustBeCopy<T:Copy> {
+}
+
+fn bar<T,U>()
+ where T: MustBeCopy<U> //~ ERROR E0277
+{
+}
+
+
+fn main() { }