Sisu
E0132

Range written another language's way

ErrorSafe fix

Built from the repository at commit a8614dc.

A range is written a..b, which leaves out b, or a..=b, which includes it. Sisu has no a..<b and no a...b.

Why

.. already leaves out its end in a for loop, so an inclusive .., as some languages spell it, would change the loops that exist; Rust's ..= adds the inclusive form without that. Both work in a for loop and in a pattern. 0..<n means what 0..n means, so the fix deletes the <. 1...5 could mean 1..=5 or 1..5, so the report names both and offers no fix.

Broken

fn main() {
    for i in 0..<3 {
        print(i)
    }
}

What sisu says

error[E0132]: write `0..3`
 --> E0132.sisu:2:15
  |
2 |     for i in 0..<3 {
  |               ^^^
  |
help: remove the `<`
  |
2 -     for i in 0..<3 {
2 +     for i in 0..3 {
  |

sisu: 1 error
sisu: for more on a code, run `sisu explain <code>`: E0132

Fixed

fn main() {
    for i in 0..3 {
        print(i)
    }
}