about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorCameron Hart <cameron.hart@gmail.com>2017-07-23 17:27:13 +1000
committerCameron Hart <cameron.hart@gmail.com>2017-07-23 17:27:13 +1000
commit200c4d041059dd233c2181ff0fd0997b08bdc755 (patch)
tree5dd1060b9fa1ba4a97956ec72876dde92e9dc505 /src/test
parent504328a31a211814f9cac6de84c5a7ed154f58eb (diff)
Better detection of repr packed and align
Fixes issue #43317.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/conflicting-repr-hints.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/compile-fail/conflicting-repr-hints.rs b/src/test/compile-fail/conflicting-repr-hints.rs
index 01fa3ffbaa6..e4a9205409b 100644
--- a/src/test/compile-fail/conflicting-repr-hints.rs
+++ b/src/test/compile-fail/conflicting-repr-hints.rs
@@ -27,7 +27,15 @@ enum D { D }
 #[repr(C, packed)]
 struct E(i32);
 
-#[repr(packed, align(8))] //~ ERROR conflicting packed and align representation hints
-struct F(i32);
+#[repr(packed, align(8))]
+struct F(i32); //~ ERROR struct has conflicting packed and align representation hints
+
+#[repr(packed)]
+#[repr(align(8))]
+struct G(i32); //~ ERROR struct has conflicting packed and align representation hints
+
+#[repr(align(8))]
+#[repr(packed)]
+struct H(i32); //~ ERROR struct has conflicting packed and align representation hints
 
 fn main() {}