Uplift excessive_precision to the correctness category

This commit is contained in:
Krishna Sai Veera Reddy 2020-02-17 00:17:26 -08:00
parent 552452873c
commit 45936a6e26
3 changed files with 7 additions and 7 deletions

View File

@ -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"
}

View File

@ -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),
@ -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),

View File

@ -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",