Suggest adding zero to errornous floating point number with dot and exponent but no post-dot digit #98836
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When writing floating point numbers, some people try to include the dot and and exponent notation. Rust sees this as a field access on an integral value. It should suggest adding a
0
after the dot.Given the following code: Playpen
The current output is:
Ideally the output should suggest adding a zero, like as follows:
It might also be good to squelch the E0610 message altogether too.
The text was updated successfully, but these errors were encountered: