summaryrefslogtreecommitdiffstats
path: root/tests/ui/wf/wf-enum-fields-struct-variant.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/wf/wf-enum-fields-struct-variant.rs')
-rw-r--r--tests/ui/wf/wf-enum-fields-struct-variant.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/wf/wf-enum-fields-struct-variant.rs b/tests/ui/wf/wf-enum-fields-struct-variant.rs
new file mode 100644
index 000000000..c25622fa7
--- /dev/null
+++ b/tests/ui/wf/wf-enum-fields-struct-variant.rs
@@ -0,0 +1,18 @@
+// Test that we check struct fields for WFedness.
+
+#![feature(associated_type_defaults)]
+
+#![allow(dead_code)]
+
+struct IsCopy<T:Copy> {
+ value: T
+}
+
+enum AnotherEnum<A> {
+ AnotherVariant {
+ f: IsCopy<A> //~ ERROR E0277
+ }
+}
+
+
+fn main() { }