aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-30 18:11:26 +0100
committerGitHub <[email protected]>2020-07-30 18:11:26 +0100
commite28ea81b2b68a61b5c5eec3c815172b17256a25f (patch)
tree52ff9cf9deb7a2116d7330ca36379f71808a18e5 /xtask/src
parentbc8610e2b58fe101ddc34d0ce389cfa829060c62 (diff)
parent01d6c3836b1c540b14d9c9e17974df64afa978c0 (diff)
Merge #5609
5609: Attrs & Vis r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/codegen/rust.ungram27
1 files changed, 14 insertions, 13 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index 4025f7f96..a97cc80e9 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -173,6 +173,20 @@ ConstParam =
173LifetimeParam = 173LifetimeParam =
174 Attr* 'lifetime' 174 Attr* 'lifetime'
175 175
176Visibility =
177 'pub' ('('
178 'super'
179 | 'self'
180 | 'crate'
181 | 'in' Path
182 ')')?
183
184Attr =
185 '#' '!'? '[' Path ('=' input:AttrInput)? ']'
186
187AttrInput =
188 Literal | TokenTree
189
176ParenType = 190ParenType =
177 '(' TypeRef ')' 191 '(' TypeRef ')'
178 192
@@ -391,9 +405,6 @@ TupleStructPat =
391TuplePat = 405TuplePat =
392 '(' args:Pat* ')' 406 '(' args:Pat* ')'
393 407
394Visibility =
395 'pub' ('(' 'super' | 'self' | 'crate' | 'in' Path ')')?
396
397Name = 408Name =
398 'ident' 409 'ident'
399 410
@@ -416,9 +427,6 @@ MacroStmts =
416 statements:Stmt* 427 statements:Stmt*
417 Expr? 428 Expr?
418 429
419Attr =
420 '#' '!'? '[' Path ('=' input:AttrInput)? ']'
421
422TypeBound = 430TypeBound =
423 'lifetime' | 'const'? TypeRef 431 'lifetime' | 'const'? TypeRef
424 432
@@ -465,9 +473,6 @@ LifetimeArg =
465ConstArg = 473ConstArg =
466 Literal | BlockExpr BlockExpr 474 Literal | BlockExpr BlockExpr
467 475
468MetaItem =
469 Path '=' AttrInput nested_meta_items:MetaItem*
470
471AdtDef = 476AdtDef =
472 Struct 477 Struct
473| Enum 478| Enum
@@ -488,10 +493,6 @@ TypeRef =
488| ImplTraitType 493| ImplTraitType
489| DynTraitType 494| DynTraitType
490 495
491AttrInput =
492 Literal
493| TokenTree
494
495Stmt = 496Stmt =
496 LetStmt 497 LetStmt
497| ExprStmt 498| ExprStmt