1 // compile-flags: -Z print-type-sizes --crate-type=lib
4 // ^-- needed because `--pass check` does not emit the output needed.
5 // FIXME: consider using an attribute instead of side-effects.
7 // This file illustrates how packing is handled; it should cause
8 // the elimination of padding that would normally be introduced
9 // to satisfy alignment desirata.
11 // It avoids using u64/i64 because on some targets that is only 4-byte
12 // aligned (while on most it is 8-byte aligned) and so the resulting
13 // padding and overall computed sizes can be quite different.