From c04c06c4bc06852610af9d37673b03a8c041b15c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 15:09:20 +0200 Subject: Finalize WhereClause gramamr --- xtask/src/codegen/rust.ungram | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'xtask/src') diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 32f2808ea..fc665b2b2 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 ';' -- cgit v1.2.3