3 ms·
> Or autogenerate a Rust enum with the known variants inlined, plus the extra Unknown field. Unfortunately, support for this extra Unknown() field is not added
by v_lisivka 8y ago
> Or autogenerate a Rust enum with the known variants inlined, plus the extra Unknown field.
Unfortunately, support for this extra Unknown() field is not added to rustc yet even in Rust2018 edition. Compiler can do that, because it already used to save space for Option<>.
> Rust enums do not have C semantics, even if the underlying machine representation is annotated to mimic C.
Yes, it's the bug I'm talking about. Solutions are: a) remove repr(C), b) fix repr(C).