about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/parser/diagnostics.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs
index e8f47346fa7..bd0ea50b4d8 100644
--- a/compiler/rustc_parse/src/parser/diagnostics.rs
+++ b/compiler/rustc_parse/src/parser/diagnostics.rs
@@ -405,8 +405,7 @@ impl<'a> Parser<'a> {
             let prev_span = self.prev_token.span.shrink_to_lo();
             let snapshot = self.create_snapshot_for_diagnostic();
             self.bump();
-            let res = self.parse_ty();
-            if res.is_ok() && self.token == token::Eq {
+            if self.parse_ty().is_ok() && self.token == token::Eq {
                 err.span_suggestion_verbose(
                     prev_span,
                     "you might have meant to introduce a new binding",