When encountering chained operators use heuristics to recover from bad turbofish
This commit is contained in:
parent
f2023ac599
commit
ed60cf2475
5 changed files with 121 additions and 27 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue