Rellum Rellum

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

Canonical fixes

Before:

is_shorter = left < right

After:

is_shorter = len(left) < len(right)

Code example

is_shorter = left < right