summaryrefslogtreecommitdiffstats
path: root/src/test/ui/repr/repr-disallow-on-variant.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/repr/repr-disallow-on-variant.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/repr/repr-disallow-on-variant.rs b/src/test/ui/repr/repr-disallow-on-variant.rs
new file mode 100644
index 000000000..d9bd0b0e3
--- /dev/null
+++ b/src/test/ui/repr/repr-disallow-on-variant.rs
@@ -0,0 +1,9 @@
+struct Test;
+
+enum Foo {
+ #[repr(u8)]
+ //~^ ERROR attribute should be applied to an enum
+ Variant,
+}
+
+fn main() {}