1
Fork 0

Add suggestions for expressions in patterns

This commit is contained in:
Lieselotte 2024-09-18 20:38:43 +02:00
parent c2047219b5
commit db09345ef6
No known key found for this signature in database
GPG key ID: 68A9A951C7E1F283
15 changed files with 1145 additions and 95 deletions

View file

@ -807,6 +807,14 @@ parse_unexpected_expr_in_pat =
.label = arbitrary expressions are not allowed in patterns
parse_unexpected_expr_in_pat_const_sugg = consider extracting the expression into a `const`
parse_unexpected_expr_in_pat_create_guard_sugg = consider moving the expression to a match arm guard
parse_unexpected_expr_in_pat_inline_const_sugg = consider wrapping the expression in an inline `const` (requires `{"#"}![feature(inline_const_pat)]`)
parse_unexpected_expr_in_pat_update_guard_sugg = consider moving the expression to the match arm guard
parse_unexpected_if_with_if = unexpected `if` in the condition expression
.suggestion = remove the `if`