Bail out when encountering likely missing turbofish in parser
When encountering a likely intended turbofish without `::`, bubble up the diagnostic instead of emitting it to allow the parser to recover more gracefully and avoid uneccessary type errors that are likely to be wrong.
This commit is contained in:
@@ -231,7 +231,7 @@ impl<'a> Parser<'a> {
|
||||
|
||||
self.bump();
|
||||
if op.is_comparison() {
|
||||
self.check_no_chained_comparison(&lhs, &op);
|
||||
self.check_no_chained_comparison(&lhs, &op)?;
|
||||
}
|
||||
// Special cases:
|
||||
if op == AssocOp::As {
|
||||
|
||||
Reference in New Issue
Block a user