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:
Esteban Küber
2019-09-05 13:15:42 -07:00
parent dfd43f0fdd
commit afcf9b262d
8 changed files with 12 additions and 116 deletions

View File

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