S0093: ? error type mismatch
Generated from rellum-diagnostics/src/db.rs.
Explanation
A ? expression can propagate only the same error type declared by the enclosing Result-returning function. If the inner Result has a different err type, the compiler requires an explicit conversion so callers see one stable error type.
Common causes
- using ? on Result[T, IoError] inside a function returning Result[U, String]
- combining file, network, and system errors without converting them
- changing a helper's error type without updating callers
Canonical fixes
- change the enclosing function's error type to match
Before:
load() : Result[String, String] = read_file()?
After:
load() : Result[String, IoError] = read_file()?
- convert the error before propagating it
Code example
load() : Result[String, String] = read_file()?