diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-30 18:11:26 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-30 18:11:26 +0100 |
commit | e28ea81b2b68a61b5c5eec3c815172b17256a25f (patch) | |
tree | 52ff9cf9deb7a2116d7330ca36379f71808a18e5 /xtask/src | |
parent | bc8610e2b58fe101ddc34d0ce389cfa829060c62 (diff) | |
parent | 01d6c3836b1c540b14d9c9e17974df64afa978c0 (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.ungram | 27 |
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 = | |||
173 | LifetimeParam = | 173 | LifetimeParam = |
174 | Attr* 'lifetime' | 174 | Attr* 'lifetime' |
175 | 175 | ||
176 | Visibility = | ||
177 | 'pub' ('(' | ||
178 | 'super' | ||
179 | | 'self' | ||
180 | | 'crate' | ||
181 | | 'in' Path | ||
182 | ')')? | ||
183 | |||
184 | Attr = | ||
185 | '#' '!'? '[' Path ('=' input:AttrInput)? ']' | ||
186 | |||
187 | AttrInput = | ||
188 | Literal | TokenTree | ||
189 | |||
176 | ParenType = | 190 | ParenType = |
177 | '(' TypeRef ')' | 191 | '(' TypeRef ')' |
178 | 192 | ||
@@ -391,9 +405,6 @@ TupleStructPat = | |||
391 | TuplePat = | 405 | TuplePat = |
392 | '(' args:Pat* ')' | 406 | '(' args:Pat* ')' |
393 | 407 | ||
394 | Visibility = | ||
395 | 'pub' ('(' 'super' | 'self' | 'crate' | 'in' Path ')')? | ||
396 | |||
397 | Name = | 408 | Name = |
398 | 'ident' | 409 | 'ident' |
399 | 410 | ||
@@ -416,9 +427,6 @@ MacroStmts = | |||
416 | statements:Stmt* | 427 | statements:Stmt* |
417 | Expr? | 428 | Expr? |
418 | 429 | ||
419 | Attr = | ||
420 | '#' '!'? '[' Path ('=' input:AttrInput)? ']' | ||
421 | |||
422 | TypeBound = | 430 | TypeBound = |
423 | 'lifetime' | 'const'? TypeRef | 431 | 'lifetime' | 'const'? TypeRef |
424 | 432 | ||
@@ -465,9 +473,6 @@ LifetimeArg = | |||
465 | ConstArg = | 473 | ConstArg = |
466 | Literal | BlockExpr BlockExpr | 474 | Literal | BlockExpr BlockExpr |
467 | 475 | ||
468 | MetaItem = | ||
469 | Path '=' AttrInput nested_meta_items:MetaItem* | ||
470 | |||
471 | AdtDef = | 476 | AdtDef = |
472 | Struct | 477 | Struct |
473 | | Enum | 478 | | Enum |
@@ -488,10 +493,6 @@ TypeRef = | |||
488 | | ImplTraitType | 493 | | ImplTraitType |
489 | | DynTraitType | 494 | | DynTraitType |
490 | 495 | ||
491 | AttrInput = | ||
492 | Literal | ||
493 | | TokenTree | ||
494 | |||
495 | Stmt = | 496 | Stmt = |
496 | LetStmt | 497 | LetStmt |
497 | | ExprStmt | 498 | | ExprStmt |