diff options
-rw-r--r-- | xtask/src/codegen/rust.ungram | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 375df301f..1c1dec80a 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram | |||
@@ -114,6 +114,11 @@ Union = | |||
114 | Attr* Visibility? 'union' Name GenericParamList? WhereClause? | 114 | Attr* Visibility? 'union' Name GenericParamList? WhereClause? |
115 | RecordFieldList | 115 | RecordFieldList |
116 | 116 | ||
117 | AdtDef = | ||
118 | Struct | ||
119 | | Enum | ||
120 | | Union | ||
121 | |||
117 | Const = | 122 | Const = |
118 | Attr* Visibility? 'default'? 'const' (Name | '_') ':' ty:TypeRef | 123 | Attr* Visibility? 'default'? 'const' (Name | '_') ':' ty:TypeRef |
119 | '=' body:Expr ';' | 124 | '=' body:Expr ';' |
@@ -183,6 +188,21 @@ Visibility = | |||
183 | Attr = | 188 | Attr = |
184 | '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' | 189 | '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' |
185 | 190 | ||
191 | TypeRef = | ||
192 | ParenType | ||
193 | | TupleType | ||
194 | | NeverType | ||
195 | | PathType | ||
196 | | PointerType | ||
197 | | ArrayType | ||
198 | | SliceType | ||
199 | | ReferenceType | ||
200 | | PlaceholderType | ||
201 | | FnPointerType | ||
202 | | ForType | ||
203 | | ImplTraitType | ||
204 | | DynTraitType | ||
205 | |||
186 | ParenType = | 206 | ParenType = |
187 | '(' ty:TypeRef ')' | 207 | '(' ty:TypeRef ')' |
188 | 208 | ||
@@ -469,26 +489,6 @@ LifetimeArg = | |||
469 | ConstArg = | 489 | ConstArg = |
470 | Literal | BlockExpr BlockExpr | 490 | Literal | BlockExpr BlockExpr |
471 | 491 | ||
472 | AdtDef = | ||
473 | Struct | ||
474 | | Enum | ||
475 | | Union | ||
476 | |||
477 | TypeRef = | ||
478 | ParenType | ||
479 | | TupleType | ||
480 | | NeverType | ||
481 | | PathType | ||
482 | | PointerType | ||
483 | | ArrayType | ||
484 | | SliceType | ||
485 | | ReferenceType | ||
486 | | PlaceholderType | ||
487 | | FnPointerType | ||
488 | | ForType | ||
489 | | ImplTraitType | ||
490 | | DynTraitType | ||
491 | |||
492 | Stmt = | 492 | Stmt = |
493 | LetStmt | 493 | LetStmt |
494 | | ExprStmt | 494 | | ExprStmt |