aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen/rust.ungram
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/codegen/rust.ungram')
-rw-r--r--xtask/src/codegen/rust.ungram20
1 files changed, 10 insertions, 10 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index 760a8dd95..833ffd9e0 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -45,7 +45,7 @@ UseTreeList =
45Fn = 45Fn =
46 Attr* Visibility? 46 Attr* Visibility?
47 'default'? ('async' | 'const')? 'unsafe'? Abi? 47 'default'? ('async' | 'const')? 'unsafe'? Abi?
48 'fn' Name TypeParamList? ParamList RetType? 48 'fn' Name GenericParamList? ParamList RetType?
49 WhereClause? 49 WhereClause?
50 (body:BlockExpr | ';') 50 (body:BlockExpr | ';')
51 51
@@ -73,17 +73,17 @@ RetType =
73 '->' TypeRef 73 '->' TypeRef
74 74
75TypeAlias = 75TypeAlias =
76 Attr* Visibility? 'default'? 'type' Name TypeParamList? (':' TypeBoundList?)? WhereClause? 76 Attr* Visibility? 'default'? 'type' Name GenericParamList? (':' TypeBoundList?)? WhereClause?
77 '=' TypeRef ';' 77 '=' TypeRef ';'
78 78
79StructDef = 79StructDef =
80 Attr* Visibility? 'struct' Name TypeParamList? ( 80 Attr* Visibility? 'struct' Name GenericParamList? (
81 WhereClause? (RecordFieldDefList | ';') 81 WhereClause? (RecordFieldDefList | ';')
82 | TupleFieldDefList WhereClause? ';' 82 | TupleFieldDefList WhereClause? ';'
83 ) 83 )
84 84
85UnionDef = 85UnionDef =
86 Attr* Visibility? 'union' Name TypeParamList? WhereClause? 86 Attr* Visibility? 'union' Name GenericParamList? WhereClause?
87 RecordFieldDefList 87 RecordFieldDefList
88 88
89RecordFieldDefList = 89RecordFieldDefList =
@@ -103,7 +103,7 @@ FieldDefList =
103| TupleFieldDefList 103| TupleFieldDefList
104 104
105EnumDef = 105EnumDef =
106 Attr* Visibility? 'enum' Name TypeParamList? WhereClause? 106 Attr* Visibility? 'enum' Name GenericParamList? WhereClause?
107 variant_list:EnumVariantList 107 variant_list:EnumVariantList
108 108
109EnumVariantList = 109EnumVariantList =
@@ -113,7 +113,7 @@ EnumVariant =
113 Attr* Visibility? Name FieldDefList ('=' Expr)? 113 Attr* Visibility? Name FieldDefList ('=' Expr)?
114 114
115TraitDef = 115TraitDef =
116 Attr* Visibility? 'unsafe'? 'auto'? 'trait' Name TypeParamList 116 Attr* Visibility? 'unsafe'? 'auto'? 'trait' Name GenericParamList
117 (':' TypeBoundList?)? WhereClause 117 (':' TypeBoundList?)? WhereClause
118 AssocItemList 118 AssocItemList
119 119
@@ -129,7 +129,7 @@ StaticDef =
129 '=' body:Expr ';' 129 '=' body:Expr ';'
130 130
131ImplDef = 131ImplDef =
132 Attr* Visibility? 'const'? 'default'? 'unsafe'? 'impl' TypeParamList? '!'? 'for' 132 Attr* Visibility? 'const'? 'default'? 'unsafe'? 'impl' GenericParamList? '!'? 'for'
133 WhereClause? 133 WhereClause?
134 AssocItemList 134 AssocItemList
135 135
@@ -164,7 +164,7 @@ FnPointerType =
164 Abi 'unsafe'? 'fn' ParamList RetType? 164 Abi 'unsafe'? 'fn' ParamList RetType?
165 165
166ForType = 166ForType =
167 'for' TypeParamList TypeRef 167 'for' GenericParamList TypeRef
168 168
169ImplTraitType = 169ImplTraitType =
170 'impl' TypeBoundList 170 'impl' TypeBoundList
@@ -379,7 +379,7 @@ MacroStmts =
379Attr = 379Attr =
380 '#' '!'? '[' Path ('=' input:AttrInput)? ']' 380 '#' '!'? '[' Path ('=' input:AttrInput)? ']'
381 381
382TypeParamList = 382GenericParamList =
383 '<' 383 '<'
384 TypeParam* 384 TypeParam*
385 LifetimeParam* 385 LifetimeParam*
@@ -404,7 +404,7 @@ TypeBoundList =
404 bounds:TypeBound* 404 bounds:TypeBound*
405 405
406WherePred = 406WherePred =
407 ('for' TypeParamList)? ('lifetime' | TypeRef) ':' TypeBoundList 407 ('for' GenericParamList)? ('lifetime' | TypeRef) ':' TypeBoundList
408 408
409WhereClause = 409WhereClause =
410 'where' predicates:WherePred* 410 'where' predicates:WherePred*