diff options
| author | bors <bors@rust-lang.org> | 2022-11-18 20:26:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-18 20:26:58 +0000 |
| commit | b833ad56f46a0bbe0e8729512812a161e7dae28a (patch) | |
| tree | 06ff2cca21b9852960818c4d0f79b3cac302a54c /compiler/rustc_parse/src/errors.rs | |
| parent | 70fe5f08fffd16dc20506f7d140e47b074f77964 (diff) | |
| parent | 7e5e520c7daf193bc33f8dd12dfd9ec4ed1f261a (diff) | |
| download | rust-b833ad56f46a0bbe0e8729512812a161e7dae28a.tar.gz rust-b833ad56f46a0bbe0e8729512812a161e7dae28a.zip | |
Auto merge of #104573 - matthiaskrgr:rollup-k36ybtp, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #101162 (Migrate rustc_resolve to use SessionDiagnostic, part # 1) - #103386 (Don't allow `CoerceUnsized` into `dyn*` (except for trait upcasting)) - #103405 (Detect incorrect chaining of if and if let conditions and recover) - #103594 (Fix non-associativity of `Instant` math on `aarch64-apple-darwin` targets) - #104006 (Add variant_name function to `LangItem`) - #104494 (Migrate GUI test to use functions) - #104516 (rustdoc: clean up sidebar width CSS) - #104550 (fix a typo) Failed merges: - #104554 (Use `ErrorGuaranteed::unchecked_claim_error_was_emitted` less) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 724d92254a4..211450250fd 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -1219,3 +1219,11 @@ pub(crate) struct FnPtrWithGenericsSugg { pub arity: usize, pub for_param_list_exists: bool, } + +#[derive(Diagnostic)] +#[diag(parser_unexpected_if_with_if)] +pub(crate) struct UnexpectedIfWithIf( + #[primary_span] + #[suggestion(applicability = "machine-applicable", code = " ", style = "verbose")] + pub Span, +); |
