error invalid-number
Некорректный числовой литерал.
What it means#
Integer and floating-point literals must follow §1.5: decimal, 0x, 0o and 0b forms with digits valid for the base, _ as a separator between digits, an optional exponent, and an optional type suffix such as u8 or f32. Digits out of range for the base, a missing digit after the prefix, or a misplaced _ make the literal malformed. (A well-formed literal that does not fit its type is literal-overflow.)
Example#
fn main() {
let mask = 0b1021 // <- invalid-number (2 is not a binary digit)
}error
invalid-number
How to fix#
fn main() {
let mask = 0b1011
}Use only digits of the chosen base, put a digit after 0x, 0o or 0b, and keep _ between digits (1_000, not 1000_).