E1006: expected pattern
Generated from rellum-diagnostics/src/db.rs.
Explanation
Match arms that destructure values must start with a supported pattern form, such as _, none, some(...), ok(...), err(...), a literal, a record pattern, or an enum variant pattern.
Common causes
- leaving a match arm head empty
- using expression syntax where a pattern is required
- starting a pattern with an unsupported token
Canonical fixes
- write a valid pattern before
=>
Before:
match value
=> value
After:
match value
_ => value
- use a guard arm when the condition is an expression
Code example
match value
=> value