1
Fork 0

Auto merge of #103636 - chenyukang:yukang/fix-103587-sugg-if-let, r=jackh276,davidtwco

Recover from common if let syntax mistakes/typos

Fixes #103587
This commit is contained in:
bors 2022-11-10 05:19:10 +00:00
commit 11fa0850f0
11 changed files with 184 additions and 4 deletions

View file

@ -171,3 +171,4 @@ infer_msl_introduces_static = introduces a `'static` lifetime requirement
infer_msl_unmet_req = because this has an unmet lifetime requirement
infer_msl_trait_note = this has an implicit `'static` lifetime requirement
infer_msl_trait_sugg = consider relaxing the implicit `'static` requirement
infer_suggest_add_let_for_letchains = consider adding `let`

View file

@ -125,6 +125,9 @@ parser_if_expression_missing_condition = missing condition for `if` expression
parser_expected_expression_found_let = expected expression, found `let` statement
parser_expect_eq_instead_of_eqeq = expected `=`, found `==`
.suggestion = consider using `=` here
parser_expected_else_block = expected `{"{"}`, found {$first_tok}
.label = expected an `if` or a block after this `else`
.suggestion = add an `if` if this is the condition of a chained `else if` statement