Skip to content

Commit 30f4d63

Browse files
committed
Move some lints from Misc to Operators
1 parent 13824d1 commit 30f4d63

12 files changed

+514
-476
lines changed

clippy_lints/src/lib.register_all.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,6 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
206206
LintId::of(methods::WRONG_SELF_CONVENTION),
207207
LintId::of(methods::ZST_OFFSET),
208208
LintId::of(minmax::MIN_MAX),
209-
LintId::of(misc::CMP_NAN),
210-
LintId::of(misc::CMP_OWNED),
211-
LintId::of(misc::MODULO_ONE),
212209
LintId::of(misc::SHORT_CIRCUIT_STATEMENT),
213210
LintId::of(misc::TOPLEVEL_REF_ARG),
214211
LintId::of(misc::ZERO_PTR),
@@ -244,6 +241,8 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
244241
LintId::of(operators::ABSURD_EXTREME_COMPARISONS),
245242
LintId::of(operators::ASSIGN_OP_PATTERN),
246243
LintId::of(operators::BAD_BIT_MASK),
244+
LintId::of(operators::CMP_NAN),
245+
LintId::of(operators::CMP_OWNED),
247246
LintId::of(operators::DOUBLE_COMPARISONS),
248247
LintId::of(operators::DURATION_SUBSEC),
249248
LintId::of(operators::EQ_OP),
@@ -252,6 +251,7 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
252251
LintId::of(operators::IDENTITY_OP),
253252
LintId::of(operators::INEFFECTIVE_BIT_MASK),
254253
LintId::of(operators::MISREFACTORED_ASSIGN_OP),
254+
LintId::of(operators::MODULO_ONE),
255255
LintId::of(operators::OP_REF),
256256
LintId::of(option_env_unwrap::OPTION_ENV_UNWRAP),
257257
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
@@ -346,11 +346,6 @@ store.register_lints(&[
346346
methods::WRONG_SELF_CONVENTION,
347347
methods::ZST_OFFSET,
348348
minmax::MIN_MAX,
349-
misc::CMP_NAN,
350-
misc::CMP_OWNED,
351-
misc::FLOAT_CMP,
352-
misc::FLOAT_CMP_CONST,
353-
misc::MODULO_ONE,
354349
misc::SHORT_CIRCUIT_STATEMENT,
355350
misc::TOPLEVEL_REF_ARG,
356351
misc::USED_UNDERSCORE_BINDING,
@@ -412,17 +407,22 @@ store.register_lints(&[
412407
operators::ABSURD_EXTREME_COMPARISONS,
413408
operators::ASSIGN_OP_PATTERN,
414409
operators::BAD_BIT_MASK,
410+
operators::CMP_NAN,
411+
operators::CMP_OWNED,
415412
operators::DOUBLE_COMPARISONS,
416413
operators::DURATION_SUBSEC,
417414
operators::EQ_OP,
418415
operators::ERASING_OP,
419416
operators::FLOAT_ARITHMETIC,
417+
operators::FLOAT_CMP,
418+
operators::FLOAT_CMP_CONST,
420419
operators::FLOAT_EQUALITY_WITHOUT_ABS,
421420
operators::IDENTITY_OP,
422421
operators::INEFFECTIVE_BIT_MASK,
423422
operators::INTEGER_ARITHMETIC,
424423
operators::INTEGER_DIVISION,
425424
operators::MISREFACTORED_ASSIGN_OP,
425+
operators::MODULO_ONE,
426426
operators::OP_REF,
427427
operators::VERBOSE_BIT_MASK,
428428
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(mut_mut::MUT_MUT),
7069
LintId::of(needless_bitwise_bool::NEEDLESS_BITWISE_BOOL),
@@ -74,6 +73,7 @@ store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
7473
LintId::of(no_effect::NO_EFFECT_UNDERSCORE_BINDING),
7574
LintId::of(non_expressive_names::MANY_SINGLE_CHAR_NAMES),
7675
LintId::of(non_expressive_names::SIMILAR_NAMES),
76+
LintId::of(operators::FLOAT_CMP),
7777
LintId::of(operators::VERBOSE_BIT_MASK),
7878
LintId::of(pass_by_ref_or_value::LARGE_TYPES_PASSED_BY_VALUE),
7979
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
@@ -36,7 +36,6 @@ store.register_group(true, "clippy::restriction", Some("clippy_restriction"), ve
3636
LintId::of(methods::FILETYPE_IS_FILE),
3737
LintId::of(methods::GET_UNWRAP),
3838
LintId::of(methods::UNWRAP_USED),
39-
LintId::of(misc::FLOAT_CMP_CONST),
4039
LintId::of(misc_early::SEPARATED_LITERAL_SUFFIX),
4140
LintId::of(misc_early::UNNEEDED_FIELD_PATTERN),
4241
LintId::of(misc_early::UNSEPARATED_LITERAL_SUFFIX),
@@ -48,6 +47,7 @@ store.register_group(true, "clippy::restriction", Some("clippy_restriction"), ve
4847
LintId::of(module_style::SELF_NAMED_MODULE_FILES),
4948
LintId::of(modulo_arithmetic::MODULO_ARITHMETIC),
5049
LintId::of(operators::FLOAT_ARITHMETIC),
50+
LintId::of(operators::FLOAT_CMP_CONST),
5151
LintId::of(operators::INTEGER_ARITHMETIC),
5252
LintId::of(operators::INTEGER_DIVISION),
5353
LintId::of(panic_in_result_fn::PANIC_IN_RESULT_FN),

0 commit comments

Comments
 (0)