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:
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user