Looser check is better for absence of padding
// A struct whose size is the sum of the sizes of its fields cannot
// have padding between fields. This check is somewhat redundant
// since a `#[repr(C)]` struct with `align_of() == 1` is also know
// not to have padding
// (since all fields must also have `align_of() == 1`),
// but it doesn’t hurt to check.
I'm wondering if it would be better to only have this check. align_of() == 1
basically mandates that you use packed structs. However packed structs have the downside of not being able to make references to their fields, and there are zero copy situations like shared memory where you know the arch is the same on both ends. So this check has the advantage of being more flexible but still preventing all of the situations that create UB I think?