From b250ae6c55c446f65f85914d98da2cd2c75871f7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 15:01:18 +0200 Subject: Finalize TypeBound grammar --- xtask/src/codegen/rust.ungram | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'xtask/src') diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 4015e3890..32f2808ea 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -242,6 +242,13 @@ ImplTraitType = DynTraitType = 'dyn' TypeBoundList +TypeBoundList = + bounds:(TypeBound ('+' TypeBound)* '+'?) + +TypeBound = + 'lifetime' +| '?'? Type + TupleExpr = Attr* '(' Expr* ')' @@ -443,12 +450,6 @@ MacroStmts = statements:Stmt* Expr? -TypeBound = - 'lifetime' | 'const'? Type - -TypeBoundList = - bounds:TypeBound* - WherePred = ('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList -- cgit v1.2.3