1
Fork 0

fix #103587, Recover from common if let syntax mistakes/typos

This commit is contained in:
yukang 2022-10-27 14:43:15 +08:00
parent 57d3c58ed6
commit 667b15bb0e
7 changed files with 165 additions and 4 deletions

View file

@ -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 {