3 ms·
They are padded for aligned access, so on amd64 Option<u64> will be 16 bytes.[0] However, the unused discriminant values are counted as niches for enums wrappin
by Nullabillity 5y ago
They are padded for aligned access, so on amd64 Option<u64> will be 16 bytes.[0] However, the unused discriminant values are counted as niches for enums wrapping that, so Option<Option<u64>> is still 16 bytes (for example).
[0]: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ccfc6db189ae326a52d3d5187fce11fc https://play.rust-lang.org/?version=stable&mode=debug&editio...