add alignment specific packed repr tests

This commit is contained in:
Tanner Rogalsky authored and David Tolnay committed 2020-06-21 16:46:27 -07:00
1 parent 1cd10a7d09
commit 7e5701ad2b
1 file changed
+12
+12
View File
@@ -1893,4 +1893,16 @@ fn test_packed_struct_can_derive_serialize() {
struct CPacked {
t: f32,
}
#[derive(Copy, Clone, Serialize)]
#[repr(C, packed(2))]
struct CPacked2 {
t: f32,
}
#[derive(Copy, Clone, Serialize)]
#[repr(packed(2), C)]
struct Packed2C {
t: f32,
}
}