about summary refs log tree commit diff
path: root/tests/ui/repr/repr-empty-packed.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/repr/repr-empty-packed.rs')
-rw-r--r--tests/ui/repr/repr-empty-packed.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/repr/repr-empty-packed.rs b/tests/ui/repr/repr-empty-packed.rs
new file mode 100644
index 00000000000..6e390a12b15
--- /dev/null
+++ b/tests/ui/repr/repr-empty-packed.rs
@@ -0,0 +1,9 @@
+//@ compile-flags: --crate-type=lib
+#![deny(unused_attributes)]
+
+#[repr()] //~ ERROR unused attribute
+#[repr(packed)] //~ ERROR attribute should be applied to a struct or union
+pub enum Foo {
+    Bar,
+    Baz(i32),
+}