diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index b773eaf8b65..74fe65633dc 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -181,6 +181,12 @@ Visibility = | 'in' Path ')')? +Attr = + '#' '!'? '[' Path ('=' input:AttrInput)? ']' + +AttrInput = + Literal | TokenTree + ParenType = '(' TypeRef ')' @@ -421,9 +427,6 @@ MacroStmts = statements:Stmt* Expr? -Attr = - '#' '!'? '[' Path ('=' input:AttrInput)? ']' - TypeBound = 'lifetime' | 'const'? TypeRef @@ -493,10 +496,6 @@ TypeRef = | ImplTraitType | DynTraitType -AttrInput = - Literal -| TokenTree - Stmt = LetStmt | ExprStmt