]>
git.proxmox.com Git - rustc.git/blob - tests/ui/print_type_sizes/repr-align.rs
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 padding is handled: alignment
8 // requirements can lead to the introduction of padding, either before
9 // fields or at the end of the structure as a whole.
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.