2025-03-16 20:23:22 +00:00
|
|
|
#![no_std]
|
|
|
|
|
|
|
|
// Note the normalization:
|
|
|
|
// `#[repr(packed)]` in has the implict "1" in rustdoc JSON.
|
|
|
|
|
2025-03-20 23:01:32 +00:00
|
|
|
//@ is "$.index[?(@.name=='Packed')].attrs" '["#[attr = Repr([ReprPacked(Align(1 bytes))])]\n"]'
|
2025-03-16 20:23:22 +00:00
|
|
|
#[repr(packed)]
|
|
|
|
pub struct Packed {
|
|
|
|
a: i8,
|
|
|
|
b: i64,
|
|
|
|
}
|
|
|
|
|
2025-03-20 23:01:32 +00:00
|
|
|
//@ is "$.index[?(@.name=='PackedAligned')].attrs" '["#[attr = Repr([ReprPacked(Align(4 bytes))])]\n"]'
|
2025-03-16 20:23:22 +00:00
|
|
|
#[repr(packed(4))]
|
|
|
|
pub struct PackedAligned {
|
|
|
|
a: i8,
|
|
|
|
b: i64,
|
|
|
|
}
|