prefer-exclusive-range Prefer exclusive ranges over inclusive ranges offset by one An inclusive range ending one below its upper bound expresses exclusion through extra arithmetic. Instead, you SHOULD write the upper bound directly with ... The rewritten range has type Range rather than RangeInclusive. The rewritten range does not preserve an overflow trap when the upper bound is the minimum integer. - Category: style - Level: warning - Fix: suggestion - Scope: module Reported declare const start: int32; declare const end: int32; const before = start..=end - 1; Accepted declare const start: int32; declare const end: int32; const before = start..end; Prior art - Clippy ยท rangeminusone language/linter/src/rules/style/preferexclusiverange.rs:8