aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/pin_project/packed.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pin_project/packed.rs')
-rw-r--r--tests/ui/pin_project/packed.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/ui/pin_project/packed.rs b/tests/ui/pin_project/packed.rs
index f756605..dd3ebfd 100644
--- a/tests/ui/pin_project/packed.rs
+++ b/tests/ui/pin_project/packed.rs
@@ -2,7 +2,7 @@ use pin_project::pin_project;
#[pin_project]
#[repr(packed, C)] //~ ERROR may not be used on #[repr(packed)] types
-struct A {
+struct Packed1 {
#[pin]
f: u8,
}
@@ -10,14 +10,22 @@ struct A {
// Test putting 'repr' before the 'pin_project' attribute
#[repr(packed, C)] //~ ERROR may not be used on #[repr(packed)] types
#[pin_project]
-struct B {
+struct Packed2 {
#[pin]
f: u8,
}
#[pin_project]
#[repr(packed(2))] //~ ERROR may not be used on #[repr(packed)] types
-struct C {
+struct PackedN1 {
+ #[pin]
+ f: u32,
+}
+
+// Test putting 'repr' before the 'pin_project' attribute
+#[repr(packed(2))] //~ ERROR may not be used on #[repr(packed)] types
+#[pin_project]
+struct PackedN2 {
#[pin]
f: u32,
}