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

E0002: Invalid integer

CodeCategoryStability
E0002LexerPermanent

Explanation

Rue could not represent the value of an integer literal while tokenizing it.

Likely cause

The literal's value is greater than the largest unsigned 64-bit integer, 18446744073709551615. Digit separators do not change that value.

Examples

Literal above the tokenization limit

fn main() {
    let too_large = 18446744073709551616;
}

Largest accepted literal value

fn main() {
    let largest: u64 = 18446744073709551615;
}

References