1
Fork 0

Auto merge of #5202 - krishna-veerareddy:issue-5201-move-lossy-float-literal-restriction, r=flip1995

Move check for lossy whole-number floats out of `excessive_precision`

changelog: Add new lint `lossy_float_literal` to detect lossy whole number float literals and move it out of `excessive_precision` again.

Fixes #5201
This commit is contained in:
bors 2020-02-21 09:43:55 +00:00
commit acfcbee4a2
11 changed files with 214 additions and 145 deletions

View file

@ -6,7 +6,7 @@ pub use lint::Lint;
pub use lint::LINT_LEVELS;
// begin lint list, do not remove this comment, its used in `update_lints`
pub const ALL_LINTS: [Lint; 355] = [
pub const ALL_LINTS: [Lint; 356] = [
Lint {
name: "absurd_extreme_comparisons",
group: "correctness",
@ -492,10 +492,10 @@ pub const ALL_LINTS: [Lint; 355] = [
},
Lint {
name: "excessive_precision",
group: "correctness",
group: "style",
desc: "excessive precision for float literal",
deprecation: None,
module: "excessive_precision",
module: "float_literal",
},
Lint {
name: "exit",
@ -1001,6 +1001,13 @@ pub const ALL_LINTS: [Lint; 355] = [
deprecation: None,
module: "booleans",
},
Lint {
name: "lossy_float_literal",
group: "restriction",
desc: "lossy whole number float literals",
deprecation: None,
module: "float_literal",
},
Lint {
name: "main_recursion",
group: "style",