Skip to content

Commit

Permalink
Uplift excessive_precision to the correctness category
Browse files Browse the repository at this point in the history
  • Loading branch information
krishna-veerareddy committed Feb 17, 2020
1 parent 5524528 commit 45936a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions clippy_lints/src/excessive_precision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ declare_clippy_lint! {
///
/// ```rust
/// // Bad
/// let v: f32 = 0.123_456_789_9;
/// println!("{}", v); // 0.123_456_789
/// let a: f32 = 0.123_456_789_9; // 0.123_456_789
/// let b: f32 = 16_777_217.0; // 16_777_216.0
///
/// // Good
/// let v: f64 = 0.123_456_789_9;
/// println!("{}", v); // 0.123_456_789_9
/// let a: f64 = 0.123_456_789_9;
/// let b: f64 = 16_777_216.0;
/// ```
pub EXCESSIVE_PRECISION,
style,
correctness,
"excessive precision for float literal"
}

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&enum_variants::MODULE_INCEPTION),
LintId::of(&eq_op::OP_REF),
LintId::of(&eta_reduction::REDUNDANT_CLOSURE),
LintId::of(&excessive_precision::EXCESSIVE_PRECISION),
LintId::of(&formatting::SUSPICIOUS_ASSIGNMENT_FORMATTING),
LintId::of(&formatting::SUSPICIOUS_ELSE_FORMATTING),
LintId::of(&formatting::SUSPICIOUS_UNARY_OP_FORMATTING),
Expand Down Expand Up @@ -1567,6 +1566,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&enum_clike::ENUM_CLIKE_UNPORTABLE_VARIANT),
LintId::of(&eq_op::EQ_OP),
LintId::of(&erasing_op::ERASING_OP),
LintId::of(&excessive_precision::EXCESSIVE_PRECISION),
LintId::of(&formatting::POSSIBLE_MISSING_COMMA),
LintId::of(&functions::NOT_UNSAFE_PTR_ARG_DEREF),
LintId::of(&indexing_slicing::OUT_OF_BOUNDS_INDEXING),
Expand Down
2 changes: 1 addition & 1 deletion src/lintlist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ pub const ALL_LINTS: [Lint; 355] = [
},
Lint {
name: "excessive_precision",
group: "style",
group: "correctness",
desc: "excessive precision for float literal",
deprecation: None,
module: "excessive_precision",
Expand Down

0 comments on commit 45936a6

Please sign in to comment.