I am writing a physics-based Rust project using Clippy as the analysis tool, and have the following code:
const G: f64 = 6.67430e-11;
const C: i32 = 299792458;
const PLANK_CONSTANT: f64 = 6.62607015eā34; // error
The error states that I should have at least one digit in the exponent, but as you can see there are many digits. I have tried removing the decimal place, adding spaces, but it still gives the error, even though it doesn't give the error for the variable G.
The full error if it helps:
Expected at least one digit in exponent. '(', '+', '-', ';', or '[' expected, got 'ā'. Unknown start of token: \u{2212}
I feel like I am missing something stupid but I have read my code many times!
Surprise, it works :)
I've just replaced
ā
(a dash) with-
(a minus).