diff options
| author | yukang <moorekang@gmail.com> | 2023-05-03 11:56:19 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2023-05-08 10:56:20 +0800 |
| commit | 20e6e6a4932991c4b53605154868cfa645b04998 (patch) | |
| tree | 0b12d97bc9d6bf9087bc6b508d26daa1b5590cdb /compiler/rustc_parse/src | |
| parent | 0bb43c63c33bf29e7a24e696f619be8e55e62f37 (diff) | |
| download | rust-20e6e6a4932991c4b53605154868cfa645b04998.tar.gz rust-20e6e6a4932991c4b53605154868cfa645b04998.zip | |
cleanup
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 3 |
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", |
