diff options
| author | yukang <moorekang@gmail.com> | 2022-11-15 08:53:17 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2022-11-15 08:53:17 +0800 |
| commit | 74c9a6c6df5a9fb1a3dc8099f773301e4fc3cdb4 (patch) | |
| tree | 39643326a8275083638e8059da87498197bac594 /compiler/rustc_parse/src/errors.rs | |
| parent | 101e1822c3e54e63996c8aaa014d55716f3937eb (diff) | |
| download | rust-74c9a6c6df5a9fb1a3dc8099f773301e4fc3cdb4.tar.gz rust-74c9a6c6df5a9fb1a3dc8099f773301e4fc3cdb4.zip | |
fix #103381, Detect incorrect chaining of if and if let conditions
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 a39398950a5..e3177ac8760 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -1301,3 +1301,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, +); |
