Skip to content

Commit 3ad3c51

Browse files
Demote float_cmp to pedantic
1 parent 871ad80 commit 3ad3c51

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

clippy_lints/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11321132
LintId::of(methods::INEFFICIENT_TO_STRING),
11331133
LintId::of(methods::MAP_FLATTEN),
11341134
LintId::of(methods::MAP_UNWRAP_OR),
1135+
LintId::of(misc::FLOAT_CMP),
11351136
LintId::of(misc::USED_UNDERSCORE_BINDING),
11361137
LintId::of(misc_early::UNSEPARATED_LITERAL_SUFFIX),
11371138
LintId::of(mut_mut::MUT_MUT),
@@ -1365,7 +1366,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
13651366
LintId::of(minmax::MIN_MAX),
13661367
LintId::of(misc::CMP_NAN),
13671368
LintId::of(misc::CMP_OWNED),
1368-
LintId::of(misc::FLOAT_CMP),
13691369
LintId::of(misc::MODULO_ONE),
13701370
LintId::of(misc::SHORT_CIRCUIT_STATEMENT),
13711371
LintId::of(misc::TOPLEVEL_REF_ARG),
@@ -1729,7 +1729,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
17291729
LintId::of(methods::ZST_OFFSET),
17301730
LintId::of(minmax::MIN_MAX),
17311731
LintId::of(misc::CMP_NAN),
1732-
LintId::of(misc::FLOAT_CMP),
17331732
LintId::of(misc::MODULO_ONE),
17341733
LintId::of(non_octal_unix_permissions::NON_OCTAL_UNIX_PERMISSIONS),
17351734
LintId::of(open_options::NONSENSICAL_OPEN_OPTIONS),

clippy_lints/src/misc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ declare_clippy_lint! {
113113
/// if (y - x).abs() > error_margin { }
114114
/// ```
115115
pub FLOAT_CMP,
116-
correctness,
116+
pedantic,
117117
"using `==` or `!=` on float values instead of comparing difference with an epsilon"
118118
}
119119

0 commit comments

Comments
 (0)