When encountering chained operators use heuristics to recover from bad turbofish

This commit is contained in:
Esteban Küber 2019-09-29 19:07:26 -07:00
parent f2023ac599
commit ed60cf2475
5 changed files with 121 additions and 27 deletions

View file

@ -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 {