E1007: expected type or pattern binding
Generated from rellum-diagnostics/src/db.rs.
Explanation
This parser code is reused in several places: type positions, type-argument lists, and result-pattern bindings. The parser needed either a valid type syntax or a valid identifier/_ binding, depending on the message at the error site.
Common causes
- leaving a type annotation incomplete
- writing an empty generic type-argument list
- using an invalid token inside ok(...) or err(...) patterns
Canonical fixes
- complete the type syntax
Before:
value: = 1
After:
value: Int = 1
- bind result patterns with an identifier or
_
Before:
match result
ok(1) => 1
After:
match result
ok(value) => value
Code example
value: = 1