Rollup merge of #64192 - estebank:turbofish-madness, r=petrochenkov
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. Fix #61329.
This commit is contained in:
commit
fae7bc756e
9 changed files with 37 additions and 138 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue