A #[repr] to allow an enum containing enums to use a single discriminant

One version of this could be having copy-only fields (no references allowed) so that more aggressive layout optimizations would be possible as there's always an opportunity to run code when reading or writing it. That would also allow things like structs than can store multiple enum fields in one byte, bitfield-style.

5 Likes