aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 20:02:55 +0100
committerAleksey Kladov <[email protected]>2020-07-30 20:02:55 +0100
commitf95f425ae4199e814e6956be1d9bb59a14758c07 (patch)
treedd3503a2be3a6699a6b111844dbcdc85b37e2425 /xtask/src
parent2e2642efccd5855e4158b01a006e7884a96982bb (diff)
Use ty to access most TypeRefs
Diffstat (limited to 'xtask/src')
-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 e09bc875a..375df301f 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -72,11 +72,11 @@ Param =
72 ) 72 )
73 73
74RetType = 74RetType =
75 '->' TypeRef 75 '->' ty:TypeRef
76 76
77TypeAlias = 77TypeAlias =
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
81Struct = 81Struct =
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
96TupleField = 96TupleField =
97 Attr* Visibility? TypeRef 97 Attr* Visibility? ty:TypeRef
98 98
99FieldList = 99FieldList =
100 RecordFieldList 100 RecordFieldList
@@ -184,7 +184,7 @@ Attr =
184 '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' 184 '#' '!'? '[' Path ('=' Literal | TokenTree)? ']'
185 185
186ParenType = 186ParenType =
187 '(' TypeRef ')' 187 '(' ty:TypeRef ')'
188 188
189TupleType = 189TupleType =
190 '(' fields:TypeRef* ')' 190 '(' fields:TypeRef* ')'
@@ -196,16 +196,16 @@ PathType =
196 Path 196 Path
197 197
198PointerType = 198PointerType =
199 '*' ('const' | 'mut') TypeRef 199 '*' ('const' | 'mut') ty:TypeRef
200 200
201ArrayType = 201ArrayType =
202 '[' TypeRef ';' Expr ']' 202 '[' ty:TypeRef ';' Expr ']'
203 203
204SliceType = 204SliceType =
205 '[' TypeRef ']' 205 '[' ty:TypeRef ']'
206 206
207ReferenceType = 207ReferenceType =
208 '&' 'lifetime'? 'mut'? TypeRef 208 '&' 'lifetime'? 'mut'? ty:TypeRef
209 209
210PlaceholderType = 210PlaceholderType =
211 '_' 211 '_'
@@ -214,7 +214,7 @@ FnPointerType =
214 Abi 'unsafe'? 'fn' ParamList RetType? 214 Abi 'unsafe'? 'fn' ParamList RetType?
215 215
216ForType = 216ForType =
217 'for' GenericParamList TypeRef 217 'for' GenericParamList ty:TypeRef
218 218
219ImplTraitType = 219ImplTraitType =
220 'impl' TypeBoundList 220 'impl' TypeBoundList
@@ -302,7 +302,7 @@ TryExpr =
302 Attr* Expr '?' 302 Attr* Expr '?'
303 303
304CastExpr = 304CastExpr =
305 Attr* Expr 'as' TypeRef 305 Attr* Expr 'as' ty:TypeRef
306 306
307RefExpr = 307RefExpr =
308 Attr* '&' ('raw' | 'mut' | 'const') Expr 308 Attr* '&' ('raw' | 'mut' | 'const') Expr