about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-07 08:06:09 +0200
committerGitHub <noreply@github.com>2019-09-07 08:06:09 +0200
commitfae7bc756e622f5cb6ffa432e914a06942e141ff (patch)
tree013e7b2b7166773a653dc433ea89f072a34cb683 /src/libsyntax/parse/parser
parentda61325bfab3f4292843791b10eeaabf2f835741 (diff)
parentdc613c6d055c1b45f7e11e6ee03e4a3095d5b8a9 (diff)
downloadrust-fae7bc756e622f5cb6ffa432e914a06942e141ff.tar.gz
rust-fae7bc756e622f5cb6ffa432e914a06942e141ff.zip
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.
Diffstat (limited to 'src/libsyntax/parse/parser')
-rw-r--r--src/libsyntax/parse/parser/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs
index 59b936a7eb4..e8c8e199fd0 100644
--- a/src/libsyntax/parse/parser/expr.rs
+++ b/src/libsyntax/parse/parser/expr.rs
@@ -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 {