about summary refs log tree commit diff
path: root/tests/ui/repr/repr-disallow-on-variant.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/repr/repr-disallow-on-variant.rs')
-rw-r--r--tests/ui/repr/repr-disallow-on-variant.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/repr/repr-disallow-on-variant.rs b/tests/ui/repr/repr-disallow-on-variant.rs
new file mode 100644
index 00000000000..d9bd0b0e38a
--- /dev/null
+++ b/tests/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() {}