S0034: arithmetic operator requires Int or Float
Generated from rellum-diagnostics/src/db.rs.
Explanation
The -, *, and / operators are numeric operations. Both operands must have the same numeric type, and Rellum does not implicitly convert other values into Int or Float.
Common causes
- subtracting, multiplying, or dividing Bool, Char, String, array, record, or enum values
- mixing Int and Float without an explicit conversion
- using arithmetic syntax where a domain-specific helper is needed
Canonical fixes
- use numeric operands of the same type
Before:
value = text - suffix
After:
value = count - offset
- convert values explicitly before arithmetic
Code example
value = text - suffix