Ruta graveolens  ·  notes from a language experiment  ·  cultivated since 2025

E0007: Empty based literal

CodeCategoryStability
E0007LexerPermanent

Explanation

A binary, octal, or hexadecimal integer literal has no digits after its base prefix.

Likely cause

The source contains only 0b, 0o, or 0x, possibly followed by separators. At least one digit valid for that base is required.

Examples

Hexadecimal prefix without digits

fn main() {
    let value = 0x;
}

Supply a hexadecimal digit

fn main() -> i32 {
    0x0
}

References