blob: ab573835b45cfb27299b6741f1907163ae951a53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#![no_std]
// Note the normalization:
// `#[repr(packed)]` in source becomes `{"repr": {"packed": 1, ...}}` in rustdoc JSON.
//
//@ is "$.index[?(@.name=='Packed')].attrs[*].repr.packed" 1
//@ is "$.index[?(@.name=='Packed')].attrs[*].repr.kind" '"rust"'
#[repr(packed)]
pub struct Packed {
a: i8,
b: i64,
}
//@ is "$.index[?(@.name=='PackedAligned')].attrs[*].repr.packed" 4
//@ is "$.index[?(@.name=='PackedAligned')].attrs[*].repr.kind" '"rust"'
#[repr(packed(4))]
pub struct PackedAligned {
a: i8,
b: i64,
}
|