-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions

Description
The lint literal representation lints get confused when a float has a fraction and an exponent.
In the example below the suggestion includes a weird digit separator after the 'E'.
#[warn(clippy::mistyped_literal_suffix)]
fn main() {
let _ = 1.12345E1_32;
}
error: mistyped literal suffix
--> src/main.rs:4:13
|
4 | let _ = 1.12345E1_32;
| ^^^^^^^^^^^^ help: did you mean to write: `1.123_45E_1_f32`
|
= note: `#[deny(clippy::mistyped_literal_suffixes)]` on by default
I'm already working on a fix. I just wanted to document this.
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions