S0090: ? operator is only valid inside pure functions
Generated from rellum-diagnostics/src/db.rs.
Explanation
The ? operator propagates errors by returning early from the enclosing function. Effect bodies, feedback clauses, and top-level bindings are not functions - they have no return path. The ? operator cannot be used in these contexts.
Common causes
- using ? inside an effect body to handle a Result
- using ? inside a feedback clause
Canonical fixes
- handle the Result explicitly with match
Before:
n = parse(input)?
After:
n = match parse(input)
ok(v) => v
err(e) => default
- move the logic into a pure function that uses ?
Code example
n = parse(input)?