E1014: expected request pattern binding
Generated from rellum-diagnostics/src/db.rs.
Explanation
Request patterns that carry a payload bind either an identifier or _ inside parentheses. Literals, expressions, and empty parentheses are not valid request payload bindings.
Common causes
- writing ok() or err() with no binding
- using a literal inside a request pattern
- placing expression syntax inside some(...)
Canonical fixes
- bind the request payload to a name
Before:
on ok(1) => 1
After:
on ok(value) => value
- use
_when the payload is intentionally ignored
Before:
on err() => fallback
After:
on err(_) => fallback
Code example
on ok(1) => 1