Anyone know of a good way to view the final layout of a struct or enum?

I have a few nested enums that are bigger than expected, and it's not enough of a problem that I need to look into it, but for curiosity's sake, it would be nice to know where each byte comes from.

With a nightly compiler, you can use #[rustc_layout(debug)] on your type.

7 Likes