Sisu
E0076

Base prefix without digits

Error

Built from the repository at commit a8614dc.

A 0x, 0b or 0o must be followed by at least one digit of its base.

Why

The prefix only names the base. Without a digit there is no number to read, so it is more likely an unfinished literal than a choice.

Broken

fn main() {
    let n = 0x
    print(n)
}

What sisu says

error[E0076]: `0x` needs at least one digit
 --> E0076.sisu:2:13
  |
2 |     let n = 0x
  |             ^^

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

Fixed

fn main() {
    let n = 0xFF
    print(n)
}