Allow deriving `Zeroable` for enums which are `#[repr(u32, i8, etc..)]`
ARitz-Cracker opened this issue · 2 comments
ARitz-Cracker commented
If an enum is explicitly defined in a manner where "0" is a valid variant, and all the payloads of the 0 variant are zeroable, then it concludes that the enum is safely zeroable.
ARitz-Cracker commented
Additionally (though this may be a separate issue) an enum which is #[repr(u8)]
and has all 256 variants explicitly defined can safely implement Pod
.
Lokathor commented
That all sounds right to me.