diff options
| author | bors <bors@rust-lang.org> | 2024-07-19 02:05:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-19 02:05:32 +0000 |
| commit | 3d68afc9e821b00d59058abc9bda670b07639955 (patch) | |
| tree | 8a3e5766b52fa3d7d75223a44425d11b4556f305 /compiler/rustc_parse/src | |
| parent | 5affbb17153bc69a9d5d8d2faa4e399a014a211e (diff) | |
| parent | d1250bc1d53360184cc9dbebd385c3492a01e683 (diff) | |
| download | rust-3d68afc9e821b00d59058abc9bda670b07639955.tar.gz rust-3d68afc9e821b00d59058abc9bda670b07639955.zip | |
Auto merge of #127936 - matthiaskrgr:rollup-ci0eg7k, r=tgross35
Rollup of 8 pull requests Successful merges: - #127418 (Wrap too long type name) - #127594 (Fuchsia status code match arm) - #127835 (Fix ICE in suggestion caused by `⩵` being recovered as `==`) - #127858 (match lowering: Rename `MatchPair` to `MatchPairTree`) - #127871 (Mention that type parameters are used recursively on bivariance error) - #127913 (remove `debug-logging` default from tools profile) - #127925 (Remove tag field from `Relation`s) - #127929 (Use more accurate span for `addr_of!` suggestion) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 5 |
2 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 4222486034b..da0701efddb 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -660,9 +660,8 @@ pub(crate) struct RemoveLet { #[diag(parse_use_eq_instead)] pub(crate) struct UseEqInstead { #[primary_span] + #[suggestion(style = "verbose", applicability = "machine-applicable", code = "=")] pub span: Span, - #[suggestion(style = "verbose", applicability = "machine-applicable", code = "")] - pub suggestion: Span, } #[derive(Diagnostic)] diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index 2fe3ab56146..326478a7175 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -566,10 +566,7 @@ impl<'a> Parser<'a> { && expected.iter().any(|tok| matches!(tok, TokenType::Token(TokenKind::Eq))) { // Likely typo: `=` → `==` in let expr or enum item - return Err(self.dcx().create_err(UseEqInstead { - span: self.token.span, - suggestion: self.token.span.with_lo(self.token.span.lo() + BytePos(1)), - })); + return Err(self.dcx().create_err(UseEqInstead { span: self.token.span })); } if self.token.is_keyword(kw::Move) && self.prev_token.is_keyword(kw::Async) { |
