-
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 thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Description
fn main() {
let _ = 0xF;
}
warning: this is a decimal constant
--> src/main.rs:2:13
|
2 | let _ = 0xF;
| ^^^
|
= note: `#[warn(clippy::zero_prefixed_literal)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal
help: if you mean to use a decimal constant, remove the `0` to avoid confusion
|
2 | let _ = xF;
| ^^
help: if you mean to use an octal constant, use `0o`
|
2 | let _ = 0oxF;
| ^^^^
Neither of Clippy's two suggestions of xF
and 0oxF
are compilable.
Mentioning @JohnTitor @flip1995 because I believe this is a regression introduced in #5129.
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have