diff options
author | Aleksey Kladov <[email protected]> | 2020-07-30 20:02:55 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-30 20:02:55 +0100 |
commit | f95f425ae4199e814e6956be1d9bb59a14758c07 (patch) | |
tree | dd3503a2be3a6699a6b111844dbcdc85b37e2425 /xtask/src | |
parent | 2e2642efccd5855e4158b01a006e7884a96982bb (diff) |
Use ty to access most TypeRefs
Diffstat (limited to 'xtask/src')
-rw-r--r-- | xtask/src/codegen/rust.ungram | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index e09bc875a..375df301f 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram | |||
@@ -72,11 +72,11 @@ Param = | |||
72 | ) | 72 | ) |
73 | 73 | ||
74 | RetType = | 74 | RetType = |
75 | '->' TypeRef | 75 | '->' ty:TypeRef |
76 | 76 | ||
77 | TypeAlias = | 77 | TypeAlias = |
78 | Attr* Visibility? 'default'? 'type' Name GenericParamList? (':' TypeBoundList?)? WhereClause? | 78 | Attr* Visibility? 'default'? 'type' Name GenericParamList? (':' TypeBoundList?)? WhereClause? |
79 | '=' TypeRef ';' | 79 | '=' ty:TypeRef ';' |
80 | 80 | ||
81 | Struct = | 81 | Struct = |
82 | Attr* Visibility? 'struct' Name GenericParamList? ( | 82 | Attr* Visibility? 'struct' Name GenericParamList? ( |
@@ -94,7 +94,7 @@ TupleFieldList = | |||
94 | '(' fields:(TupleField (',' TupleField)* ','?)? ')' | 94 | '(' fields:(TupleField (',' TupleField)* ','?)? ')' |
95 | 95 | ||
96 | TupleField = | 96 | TupleField = |
97 | Attr* Visibility? TypeRef | 97 | Attr* Visibility? ty:TypeRef |
98 | 98 | ||
99 | FieldList = | 99 | FieldList = |
100 | RecordFieldList | 100 | RecordFieldList |
@@ -184,7 +184,7 @@ Attr = | |||
184 | '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' | 184 | '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' |
185 | 185 | ||
186 | ParenType = | 186 | ParenType = |
187 | '(' TypeRef ')' | 187 | '(' ty:TypeRef ')' |
188 | 188 | ||
189 | TupleType = | 189 | TupleType = |
190 | '(' fields:TypeRef* ')' | 190 | '(' fields:TypeRef* ')' |
@@ -196,16 +196,16 @@ PathType = | |||
196 | Path | 196 | Path |
197 | 197 | ||
198 | PointerType = | 198 | PointerType = |
199 | '*' ('const' | 'mut') TypeRef | 199 | '*' ('const' | 'mut') ty:TypeRef |
200 | 200 | ||
201 | ArrayType = | 201 | ArrayType = |
202 | '[' TypeRef ';' Expr ']' | 202 | '[' ty:TypeRef ';' Expr ']' |
203 | 203 | ||
204 | SliceType = | 204 | SliceType = |
205 | '[' TypeRef ']' | 205 | '[' ty:TypeRef ']' |
206 | 206 | ||
207 | ReferenceType = | 207 | ReferenceType = |
208 | '&' 'lifetime'? 'mut'? TypeRef | 208 | '&' 'lifetime'? 'mut'? ty:TypeRef |
209 | 209 | ||
210 | PlaceholderType = | 210 | PlaceholderType = |
211 | '_' | 211 | '_' |
@@ -214,7 +214,7 @@ FnPointerType = | |||
214 | Abi 'unsafe'? 'fn' ParamList RetType? | 214 | Abi 'unsafe'? 'fn' ParamList RetType? |
215 | 215 | ||
216 | ForType = | 216 | ForType = |
217 | 'for' GenericParamList TypeRef | 217 | 'for' GenericParamList ty:TypeRef |
218 | 218 | ||
219 | ImplTraitType = | 219 | ImplTraitType = |
220 | 'impl' TypeBoundList | 220 | 'impl' TypeBoundList |
@@ -302,7 +302,7 @@ TryExpr = | |||
302 | Attr* Expr '?' | 302 | Attr* Expr '?' |
303 | 303 | ||
304 | CastExpr = | 304 | CastExpr = |
305 | Attr* Expr 'as' TypeRef | 305 | Attr* Expr 'as' ty:TypeRef |
306 | 306 | ||
307 | RefExpr = | 307 | RefExpr = |
308 | Attr* '&' ('raw' | 'mut' | 'const') Expr | 308 | Attr* '&' ('raw' | 'mut' | 'const') Expr |