about summary refs log tree commit diff
path: root/xtask/src
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/ast_src.rs1
-rw-r--r--xtask/src/codegen/rust.ungram23
2 files changed, 13 insertions, 11 deletions
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs
index 83449437bb2..d2a408e775c 100644
--- a/xtask/src/ast_src.rs
+++ b/xtask/src/ast_src.rs
@@ -186,6 +186,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
         "TUPLE_FIELD_DEF",
         "ENUM_VARIANT_LIST",
         "ITEM_LIST",
+        "ASSOC_ITEM_LIST",
         "ATTR",
         "META_ITEM", // not an item actually
         "USE_TREE",
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index a93cb381587..470ac8c8ff2 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -19,6 +19,13 @@ Item =
 | UnionDef
 | UseItem
 
+Module =
+  Attr* Visibility? 'mod' Name
+  (ItemList | ';')
+
+ItemList =
+  '{' Attr* Item* '}'
+
 FnDef =
  Attr* Visibility? Abi? 'const' 'default' 'async' 'unsafe' 'fn' Name TypeParamList?
  ParamList RetType?
@@ -67,17 +74,10 @@ EnumVariant =
 TraitDef =
   Attr* Visibility? 'unsafe'? 'auto'? 'trait' Name TypeParamList
   (':' TypeBoundList?)? WhereClause
-  ItemList
+  AssocItemList
 
-Module =
-  Attr* Visibility? 'mod' Name
-  (ItemList | ';')
-
-ItemList =
-  '{'
-    AssocItem*
-    Item*
-  '}'
+AssocItemList =
+  '{' AssocItem* '}'
 
 ConstDef =
   Attr* Visibility? 'default'? 'const' Name ':' ascribed_type:TypeRef
@@ -94,7 +94,7 @@ TypeAliasDef =
 ImplDef =
  Attr* Visibility? 'const'? 'default'? 'unsafe'? 'impl' TypeParamList? '!'? 'for'
  WhereClause?
- ItemList
+ AssocItemList
 
 ParenType =
   '(' TypeRef ')'
@@ -467,6 +467,7 @@ AssocItem =
   FnDef
 | TypeAliasDef
 | ConstDef
+| MacroCall
 
 ExternItem =
   FnDef | StaticDef