diff --git a/core/src/ast/enums.rs b/core/src/ast/enums.rs index 766833277..3169b6331 100644 --- a/core/src/ast/enums.rs +++ b/core/src/ast/enums.rs @@ -39,6 +39,9 @@ impl Enum { .variants .iter() .map(|v| { + if !matches!(v.fields, syn::Fields::Unit) { + panic!("Enums cannot have fields, we only support C-like enums"); + } let new_discriminant = v .discriminant .as_ref()