mirror of
https://github.com/serde-rs/serde.git
synced 2025-10-02 07:21:12 +00:00
add alignment specific packed repr tests
This commit is contained in:
parent
1cd10a7d09
commit
7e5701ad2b
@ -1893,4 +1893,16 @@ fn test_packed_struct_can_derive_serialize() {
|
|||||||
struct CPacked {
|
struct CPacked {
|
||||||
t: f32,
|
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,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user