Sisu
E0102

Exponent without digits

Error

Built from the repository at commit a8614dc.

The e or E of a float literal, and its optional sign, is followed by at least one digit: 1e9, 2e-3 and 1.5E+3. 1e and 1e+ are errors.

Why

An exponent says how far to shift the decimal point, so one without digits says nothing. The compiler does not invent a number to put there, so there is no fix.

Broken

fn main() {
    let x = 1e
    print(x)
}

What sisu says

error[E0102]: an exponent needs digits
 --> E0102.sisu:2:14
  |
2 |     let x = 1e
  |              ^

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

Fixed

fn main() {
    let x = 1e3
    print(x)
}