S0035: ordered comparison requires Int, Float, or Char
Generated from rellum-diagnostics/src/db.rs.
Explanation
The <, >, <=, and >= operators require a type with built-in ordering. In this compiler version, only Int, Float, and Char satisfy that operation; String ordering is intentionally not part of the ord model.
Common causes
- comparing arrays, records, enums, tuples, functions, or Bool values with ordered operators
- using ordered comparison on String values
- expecting lexicographic ordering without writing it explicitly
Canonical fixes
- compare an ordered scalar or projection
Before:
is_shorter = left < right
After:
is_shorter = len(left) < len(right)
- write an explicit comparison helper for domain-specific ordering
Code example
is_shorter = left < right