diff options
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index d9714cc1e25..53b53415429 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2534,6 +2534,12 @@ impl<'a> Parser<'a> { let mut e = e0; let mut hi; loop { + // expr? + while self.eat(&token::Question) { + let hi = self.span.hi; + e = self.mk_expr(lo, hi, ExprKind::Try(e), None); + } + // expr.f if self.eat(&token::Dot) { match self.token { @@ -2907,7 +2913,6 @@ impl<'a> Parser<'a> { } }; - if self.expr_is_complete(&lhs) { // Semi-statement forms are odd. See https://github.com/rust-lang/rust/issues/29071 return Ok(lhs); |
