S0120: unsupported literal pattern
Generated from rellum-diagnostics/src/db.rs.
Explanation
Only literal patterns that can be represented in lowered match code are accepted. If a literal form cannot be lowered as a pattern, use a guard expression or a supported pattern shape instead.
Common causes
- using a literal form that match lowering does not support
- treating a value expression as a pattern
- matching on a literal shape that requires a guard
Canonical fixes
- replace the literal with a supported pattern form
- use a supported pattern form such as _, some(...), ok(...), a record, or an enum variant