Skip to content

Commit ccd474f

Browse files
committed
Move some lints from Misc to Operators
1 parent f55ef49 commit ccd474f

12 files changed

+522
-488
lines changed

clippy_lints/src/lib.register_all.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,6 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
208208
LintId::of(methods::WRONG_SELF_CONVENTION),
209209
LintId::of(methods::ZST_OFFSET),
210210
LintId::of(minmax::MIN_MAX),
211-
LintId::of(misc::CMP_NAN),
212-
LintId::of(misc::CMP_OWNED),
213-
LintId::of(misc::MODULO_ONE),
214211
LintId::of(misc::SHORT_CIRCUIT_STATEMENT),
215212
LintId::of(misc::TOPLEVEL_REF_ARG),
216213
LintId::of(misc::ZERO_PTR),
@@ -246,6 +243,8 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
246243
LintId::of(operators::ABSURD_EXTREME_COMPARISONS),
247244
LintId::of(operators::ASSIGN_OP_PATTERN),
248245
LintId::of(operators::BAD_BIT_MASK),
246+
LintId::of(operators::CMP_NAN),
247+
LintId::of(operators::CMP_OWNED),
249248
LintId::of(operators::DOUBLE_COMPARISONS),
250249
LintId::of(operators::DURATION_SUBSEC),
251250
LintId::of(operators::EQ_OP),
@@ -254,6 +253,7 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
254253
LintId::of(operators::IDENTITY_OP),
255254
LintId::of(operators::INEFFECTIVE_BIT_MASK),
256255
LintId::of(operators::MISREFACTORED_ASSIGN_OP),
256+
LintId::of(operators::MODULO_ONE),
257257
LintId::of(operators::OP_REF),
258258
LintId::of(option_env_unwrap::OPTION_ENV_UNWRAP),
259259
LintId::of(overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL),

clippy_lints/src/lib.register_correctness.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ store.register_group(true, "clippy::correctness", Some("clippy_correctness"), ve
4242
LintId::of(methods::UNINIT_ASSUMED_INIT),
4343
LintId::of(methods::ZST_OFFSET),
4444
LintId::of(minmax::MIN_MAX),
45-
LintId::of(misc::CMP_NAN),
46-
LintId::of(misc::MODULO_ONE),
4745
LintId::of(non_octal_unix_permissions::NON_OCTAL_UNIX_PERMISSIONS),
4846
LintId::of(open_options::NONSENSICAL_OPEN_OPTIONS),
4947
LintId::of(operators::ABSURD_EXTREME_COMPARISONS),
5048
LintId::of(operators::BAD_BIT_MASK),
49+
LintId::of(operators::CMP_NAN),
5150
LintId::of(operators::EQ_OP),
5251
LintId::of(operators::ERASING_OP),
5352
LintId::of(operators::INEFFECTIVE_BIT_MASK),
53+
LintId::of(operators::MODULO_ONE),
5454
LintId::of(option_env_unwrap::OPTION_ENV_UNWRAP),
5555
LintId::of(ptr::INVALID_NULL_PTR_USAGE),
5656
LintId::of(ptr::MUT_FROM_REF),

clippy_lints/src/lib.register_lints.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,6 @@ store.register_lints(&[
350350
methods::WRONG_SELF_CONVENTION,
351351
methods::ZST_OFFSET,
352352
minmax::MIN_MAX,
353-
misc::CMP_NAN,
354-
misc::CMP_OWNED,
355-
misc::FLOAT_CMP,
356-
misc::FLOAT_CMP_CONST,
357-
misc::MODULO_ONE,
358353
misc::SHORT_CIRCUIT_STATEMENT,
359354
misc::TOPLEVEL_REF_ARG,
360355
misc::USED_UNDERSCORE_BINDING,
@@ -417,17 +412,22 @@ store.register_lints(&[
417412
operators::ABSURD_EXTREME_COMPARISONS,
418413
operators::ASSIGN_OP_PATTERN,
419414
operators::BAD_BIT_MASK,
415+
operators::CMP_NAN,
416+
operators::CMP_OWNED,
420417
operators::DOUBLE_COMPARISONS,
421418
operators::DURATION_SUBSEC,
422419
operators::EQ_OP,
423420
operators::ERASING_OP,
424421
operators::FLOAT_ARITHMETIC,
422+
operators::FLOAT_CMP,
423+
operators::FLOAT_CMP_CONST,
425424
operators::FLOAT_EQUALITY_WITHOUT_ABS,
426425
operators::IDENTITY_OP,
427426
operators::INEFFECTIVE_BIT_MASK,
428427
operators::INTEGER_ARITHMETIC,
429428
operators::INTEGER_DIVISION,
430429
operators::MISREFACTORED_ASSIGN_OP,
430+
operators::MODULO_ONE,
431431
operators::OP_REF,
432432
operators::VERBOSE_BIT_MASK,
433433
option_env_unwrap::OPTION_ENV_UNWRAP,

clippy_lints/src/lib.register_pedantic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
6464
LintId::of(methods::INEFFICIENT_TO_STRING),
6565
LintId::of(methods::MAP_UNWRAP_OR),
6666
LintId::of(methods::UNNECESSARY_JOIN),
67-
LintId::of(misc::FLOAT_CMP),
6867
LintId::of(misc::USED_UNDERSCORE_BINDING),
6968
LintId::of(mismatching_type_param_order::MISMATCHING_TYPE_PARAM_ORDER),
7069
LintId::of(mut_mut::MUT_MUT),
@@ -75,6 +74,7 @@ store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
7574
LintId::of(no_effect::NO_EFFECT_UNDERSCORE_BINDING),
7675
LintId::of(non_expressive_names::MANY_SINGLE_CHAR_NAMES),
7776
LintId::of(non_expressive_names::SIMILAR_NAMES),
77+
LintId::of(operators::FLOAT_CMP),
7878
LintId::of(operators::VERBOSE_BIT_MASK),
7979
LintId::of(pass_by_ref_or_value::LARGE_TYPES_PASSED_BY_VALUE),
8080
LintId::of(pass_by_ref_or_value::TRIVIALLY_COPY_PASS_BY_REF),

clippy_lints/src/lib.register_perf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ store.register_group(true, "clippy::perf", Some("clippy_perf"), vec![
2121
LintId::of(methods::OR_FUN_CALL),
2222
LintId::of(methods::SINGLE_CHAR_PATTERN),
2323
LintId::of(methods::UNNECESSARY_TO_OWNED),
24-
LintId::of(misc::CMP_OWNED),
24+
LintId::of(operators::CMP_OWNED),
2525
LintId::of(redundant_clone::REDUNDANT_CLONE),
2626
LintId::of(slow_vector_initialization::SLOW_VECTOR_INITIALIZATION),
2727
LintId::of(types::BOX_COLLECTION),

clippy_lints/src/lib.register_restriction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ store.register_group(true, "clippy::restriction", Some("clippy_restriction"), ve
3838
LintId::of(methods::FILETYPE_IS_FILE),
3939
LintId::of(methods::GET_UNWRAP),
4040
LintId::of(methods::UNWRAP_USED),
41-
LintId::of(misc::FLOAT_CMP_CONST),
4241
LintId::of(misc_early::SEPARATED_LITERAL_SUFFIX),
4342
LintId::of(misc_early::UNNEEDED_FIELD_PATTERN),
4443
LintId::of(misc_early::UNSEPARATED_LITERAL_SUFFIX),
@@ -50,6 +49,7 @@ store.register_group(true, "clippy::restriction", Some("clippy_restriction"), ve
5049
LintId::of(module_style::SELF_NAMED_MODULE_FILES),
5150
LintId::of(modulo_arithmetic::MODULO_ARITHMETIC),
5251
LintId::of(operators::FLOAT_ARITHMETIC),
52+
LintId::of(operators::FLOAT_CMP_CONST),
5353
LintId::of(operators::INTEGER_ARITHMETIC),
5454
LintId::of(operators::INTEGER_DIVISION),
5555
LintId::of(panic_in_result_fn::PANIC_IN_RESULT_FN),

0 commit comments

Comments
 (0)