Add suggestions for expressions in patterns
This commit is contained in:
parent
c2047219b5
commit
db09345ef6
15 changed files with 1145 additions and 95 deletions
|
@ -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`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue