fix #103587, Recover from common if let syntax mistakes/typos
This commit is contained in:
parent
57d3c58ed6
commit
667b15bb0e
7 changed files with 165 additions and 4 deletions
|
@ -420,6 +420,15 @@ pub(crate) struct ExpectedExpressionFoundLet {
|
|||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parser_expect_eq_instead_of_eqeq)]
|
||||
pub(crate) struct ExpectedEqForLetExpr {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
#[suggestion_verbose(applicability = "maybe-incorrect", code = "=")]
|
||||
pub sugg_span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parser_expected_else_block)]
|
||||
pub(crate) struct ExpectedElseBlock {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue