diff options
Diffstat (limited to 'xtask/src/codegen/rust.ungram')
-rw-r--r-- | xtask/src/codegen/rust.ungram | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 98968dece..760a8dd95 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram | |||
@@ -15,7 +15,7 @@ Item = | |||
15 | | StaticDef | 15 | | StaticDef |
16 | | StructDef | 16 | | StructDef |
17 | | TraitDef | 17 | | TraitDef |
18 | | TypeAliasDef | 18 | | TypeAlias |
19 | | UnionDef | 19 | | UnionDef |
20 | | Use | 20 | | Use |
21 | 21 | ||
@@ -72,6 +72,10 @@ Param = | |||
72 | RetType = | 72 | RetType = |
73 | '->' TypeRef | 73 | '->' TypeRef |
74 | 74 | ||
75 | TypeAlias = | ||
76 | Attr* Visibility? 'default'? 'type' Name TypeParamList? (':' TypeBoundList?)? WhereClause? | ||
77 | '=' TypeRef ';' | ||
78 | |||
75 | StructDef = | 79 | StructDef = |
76 | Attr* Visibility? 'struct' Name TypeParamList? ( | 80 | Attr* Visibility? 'struct' Name TypeParamList? ( |
77 | WhereClause? (RecordFieldDefList | ';') | 81 | WhereClause? (RecordFieldDefList | ';') |
@@ -124,10 +128,6 @@ StaticDef = | |||
124 | Attr* Visibility? 'static'? 'mut'? 'static' Name ':' ascribed_type:TypeRef | 128 | Attr* Visibility? 'static'? 'mut'? 'static' Name ':' ascribed_type:TypeRef |
125 | '=' body:Expr ';' | 129 | '=' body:Expr ';' |
126 | 130 | ||
127 | TypeAliasDef = | ||
128 | Attr* Visibility? 'default'? 'type' Name TypeParamList? WhereClause? (':' TypeBoundList?)? | ||
129 | '=' TypeRef ';' | ||
130 | |||
131 | ImplDef = | 131 | ImplDef = |
132 | Attr* Visibility? 'const'? 'default'? 'unsafe'? 'impl' TypeParamList? '!'? 'for' | 132 | Attr* Visibility? 'const'? 'default'? 'unsafe'? 'impl' TypeParamList? '!'? 'for' |
133 | WhereClause? | 133 | WhereClause? |
@@ -474,7 +474,7 @@ TypeRef = | |||
474 | 474 | ||
475 | AssocItem = | 475 | AssocItem = |
476 | Fn | 476 | Fn |
477 | | TypeAliasDef | 477 | | TypeAlias |
478 | | ConstDef | 478 | | ConstDef |
479 | | MacroCall | 479 | | MacroCall |
480 | 480 | ||