about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-09-05 13:15:42 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-09-05 13:18:05 -0700
commitafcf9b262d450edd1a7d54754e62f62d50052d8d (patch)
treed66b027530131e3ed57c65ecb073237ebd3a2d2e /src/libsyntax/parse/parser
parentdfd43f0fdd4e6969c7d82c0670d70bf305fbccf8 (diff)
downloadrust-afcf9b262d450edd1a7d54754e62f62d50052d8d.tar.gz
rust-afcf9b262d450edd1a7d54754e62f62d50052d8d.zip
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.
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 5b9f0f1df67..aeef2161412 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 {