diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 32f2808ead..fc665b2b28 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -175,7 +175,13 @@ ConstParam = ('=' default_val:Expr)? LifetimeParam = - Attr* 'lifetime' + Attr* 'lifetime' (':' TypeBoundList?)? + +WhereClause = + 'where' predicates:(WherePred (',' WherePred)* ','?) + +WherePred = + ('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList Visibility = 'pub' ('(' @@ -450,12 +456,6 @@ MacroStmts = statements:Stmt* Expr? -WherePred = - ('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList - -WhereClause = - 'where' predicates:WherePred* - ExprStmt = Attr* Expr ';'