diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 833ffd9e01..7f3063efb9 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -82,10 +82,6 @@ StructDef = | TupleFieldDefList WhereClause? ';' ) -UnionDef = - Attr* Visibility? 'union' Name GenericParamList? WhereClause? - RecordFieldDefList - RecordFieldDefList = '{' fields:RecordFieldDef* '}' @@ -102,6 +98,11 @@ FieldDefList = RecordFieldDefList | TupleFieldDefList + +UnionDef = + Attr* Visibility? 'union' Name GenericParamList? WhereClause? + RecordFieldDefList + EnumDef = Attr* Visibility? 'enum' Name GenericParamList? WhereClause? variant_list:EnumVariantList