rust/tests/rustdoc-json/attrs/repr_packed.rs
Alona Enraght-Moony 7ab71c417b tests/rustdoc-json: replace $.index[*][? with $.index[?
Done automatically with VSCode.
2025-03-21 00:48:09 +00:00

18 lines
435 B
Rust

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