Open
Description
I tried this code:
enum En1 {
Bool(bool),
Other(En2),
}
#[repr(u8)]
enum En2 {
Six = 6,
Seven = 7,
}
fn main() {
dbg!(size_of::<En1>());
}
I expected to see this happen: En1
has size 1
Instead, this happened: En1
has size 2
This will become more of an issue with range types on the horizon
Meta
rustc --version --verbose
:
1.85.1