summaryrefslogtreecommitdiffstats
path: root/src/test/ui/wf/wf-struct-bound.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/wf/wf-struct-bound.rs')
-rw-r--r--src/test/ui/wf/wf-struct-bound.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/wf/wf-struct-bound.rs b/src/test/ui/wf/wf-struct-bound.rs
new file mode 100644
index 000000000..6e558ca8f
--- /dev/null
+++ b/src/test/ui/wf/wf-struct-bound.rs
@@ -0,0 +1,16 @@
+// Test that we check struct bounds for WFedness.
+
+#![feature(associated_type_defaults)]
+
+#![allow(dead_code)]
+
+trait ExtraCopy<T:Copy> { }
+
+struct SomeStruct<T,U>
+ where T: ExtraCopy<U> //~ ERROR E0277
+{
+ data: (T,U)
+}
+
+
+fn main() { }