hecatia-elegua / bilge

Use bitsized types as if they were a feature of rust.
Apache License 2.0
171 stars 17 forks source link

validate enum variants are units #42

Closed pickx closed 1 year ago

pickx commented 1 year ago

Fixes #41.

I decided to perform the check in analyze_enum() of each derive instead of in shared::analyze_derive().

Technically we can also support empty struct variants and empty tuple variants (that would require changing the derive codegen). For now I made unit variants a requirement.