Rollup merge of #103405 - chenyukang:yukang/fix-103381-and-if, r=compiler-errors
Detect incorrect chaining of if and if let conditions and recover Fixes #103381
This commit is contained in:
commit
3efbf30220
6 changed files with 192 additions and 2 deletions
|
@ -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,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue