You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm slightly annoyed by the behaviour of rustified_enum in general. Given that there is no sane way to pick a default value for the enum in this case, I'm not sure how a proper fix for this looks like. Maybe we could just avoid deriving default for rustified enums unconditionally
I think if a struct has a rustified enum member it'd be best to just avoid generating Default, yeah. Or even better, only avoid generating default if a rustified enum doesn't have a variant equal to 0, although I don't know if that special case would be worth the hassle.
bindgen invocation:
bindgen output:
This implementation of Default is UB, since it generates an
E
with an invalid tag.The text was updated successfully, but these errors were encountered: