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:
Mazdak Farrokhzad 2019-09-07 08:06:09 +02:00 committed by GitHub
commit fae7bc756e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 37 additions and 138 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 {