diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2019-10-05 21:54:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-05 21:54:52 -0700 |
| commit | c7d7e3730aa211bec291f31d5318628411c1ba77 (patch) | |
| tree | e6daf4f93effaeb87814b30e27582631e895e97c /src/libsyntax/parse/parser/expr.rs | |
| parent | ae2a720e92f78e76db5b7c1d6308fcd87d5c5281 (diff) | |
| parent | 76456e74066d7594f23757ebade169c33276ea4d (diff) | |
| download | rust-c7d7e3730aa211bec291f31d5318628411c1ba77.tar.gz rust-c7d7e3730aa211bec291f31d5318628411c1ba77.zip | |
Rollup merge of #64909 - estebank:turbofish-reloaded, r=Centril
When encountering chained operators use heuristics to recover from bad turbofish
Diffstat (limited to 'src/libsyntax/parse/parser/expr.rs')
| -rw-r--r-- | src/libsyntax/parse/parser/expr.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs index 23674ad589d..b459782d237 100644 --- a/src/libsyntax/parse/parser/expr.rs +++ b/src/libsyntax/parse/parser/expr.rs @@ -238,7 +238,9 @@ impl<'a> Parser<'a> { self.bump(); if op.is_comparison() { - self.check_no_chained_comparison(&lhs, &op)?; + if let Some(expr) = self.check_no_chained_comparison(&lhs, &op)? { + return Ok(expr); + } } // Special cases: if op == AssocOp::As { |
