diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-31 14:01:54 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-31 14:01:54 +0100 |
commit | 84bf0240941b645ef9f8c57b81db30659f7c68e4 (patch) | |
tree | 801a66f324421dac1012b4516805c12a633d543f /xtask | |
parent | 847a50e74e3e45ea84f38efb23788fa5a61566eb (diff) | |
parent | b250ae6c55c446f65f85914d98da2cd2c75871f7 (diff) |
Merge #5621
5621: Finalize TypeBound grammar r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/src/codegen/rust.ungram | 13 |
1 files changed, 7 insertions, 6 deletions
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 = | |||
242 | DynTraitType = | 242 | DynTraitType = |
243 | 'dyn' TypeBoundList | 243 | 'dyn' TypeBoundList |
244 | 244 | ||
245 | TypeBoundList = | ||
246 | bounds:(TypeBound ('+' TypeBound)* '+'?) | ||
247 | |||
248 | TypeBound = | ||
249 | 'lifetime' | ||
250 | | '?'? Type | ||
251 | |||
245 | TupleExpr = | 252 | TupleExpr = |
246 | Attr* '(' Expr* ')' | 253 | Attr* '(' Expr* ')' |
247 | 254 | ||
@@ -443,12 +450,6 @@ MacroStmts = | |||
443 | statements:Stmt* | 450 | statements:Stmt* |
444 | Expr? | 451 | Expr? |
445 | 452 | ||
446 | TypeBound = | ||
447 | 'lifetime' | 'const'? Type | ||
448 | |||
449 | TypeBoundList = | ||
450 | bounds:TypeBound* | ||
451 | |||
452 | WherePred = | 453 | WherePred = |
453 | ('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList | 454 | ('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList |
454 | 455 | ||