Skip to content

Commit e4bff82

Browse files
committed
Move AssignOps into Operators lint pass
1 parent 6939a82 commit e4bff82

File tree

9 files changed

+261
-243
lines changed

9 files changed

+261
-243
lines changed

clippy_lints/src/assign_ops.rs

Lines changed: 0 additions & 235 deletions
This file was deleted.

clippy_lints/src/lib.register_all.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
66
LintId::of(almost_complete_letter_range::ALMOST_COMPLETE_LETTER_RANGE),
77
LintId::of(approx_const::APPROX_CONSTANT),
88
LintId::of(assertions_on_constants::ASSERTIONS_ON_CONSTANTS),
9-
LintId::of(assign_ops::ASSIGN_OP_PATTERN),
10-
LintId::of(assign_ops::MISREFACTORED_ASSIGN_OP),
119
LintId::of(async_yields_async::ASYNC_YIELDS_ASYNC),
1210
LintId::of(attrs::BLANKET_CLIPPY_RESTRICTION_LINTS),
1311
LintId::of(attrs::DEPRECATED_CFG_ATTR),
@@ -255,6 +253,8 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
255253
LintId::of(octal_escapes::OCTAL_ESCAPES),
256254
LintId::of(open_options::NONSENSICAL_OPEN_OPTIONS),
257255
LintId::of(operators::ABSURD_EXTREME_COMPARISONS),
256+
LintId::of(operators::ASSIGN_OP_PATTERN),
257+
LintId::of(operators::MISREFACTORED_ASSIGN_OP),
258258
LintId::of(option_env_unwrap::OPTION_ENV_UNWRAP),
259259
LintId::of(overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL),
260260
LintId::of(partialeq_ne_impl::PARTIALEQ_NE_IMPL),

clippy_lints/src/lib.register_lints.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ store.register_lints(&[
4040
asm_syntax::INLINE_ASM_X86_ATT_SYNTAX,
4141
asm_syntax::INLINE_ASM_X86_INTEL_SYNTAX,
4242
assertions_on_constants::ASSERTIONS_ON_CONSTANTS,
43-
assign_ops::ASSIGN_OP_PATTERN,
44-
assign_ops::MISREFACTORED_ASSIGN_OP,
4543
async_yields_async::ASYNC_YIELDS_ASYNC,
4644
attrs::ALLOW_ATTRIBUTES_WITHOUT_REASON,
4745
attrs::BLANKET_CLIPPY_RESTRICTION_LINTS,
@@ -428,8 +426,10 @@ store.register_lints(&[
428426
only_used_in_recursion::ONLY_USED_IN_RECURSION,
429427
open_options::NONSENSICAL_OPEN_OPTIONS,
430428
operators::ABSURD_EXTREME_COMPARISONS,
429+
operators::ASSIGN_OP_PATTERN,
431430
operators::FLOAT_ARITHMETIC,
432431
operators::INTEGER_ARITHMETIC,
432+
operators::MISREFACTORED_ASSIGN_OP,
433433
option_env_unwrap::OPTION_ENV_UNWRAP,
434434
option_if_let_else::OPTION_IF_LET_ELSE,
435435
overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL,

clippy_lints/src/lib.register_style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
store.register_group(true, "clippy::style", Some("clippy_style"), vec![
66
LintId::of(assertions_on_constants::ASSERTIONS_ON_CONSTANTS),
7-
LintId::of(assign_ops::ASSIGN_OP_PATTERN),
87
LintId::of(blacklisted_name::BLACKLISTED_NAME),
98
LintId::of(blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS),
109
LintId::of(bool_assert_comparison::BOOL_ASSERT_COMPARISON),
@@ -96,6 +95,7 @@ store.register_group(true, "clippy::style", Some("clippy_style"), vec![
9695
LintId::of(non_copy_const::BORROW_INTERIOR_MUTABLE_CONST),
9796
LintId::of(non_copy_const::DECLARE_INTERIOR_MUTABLE_CONST),
9897
LintId::of(non_expressive_names::JUST_UNDERSCORES_AND_DIGITS),
98+
LintId::of(operators::ASSIGN_OP_PATTERN),
9999
LintId::of(ptr::CMP_NULL),
100100
LintId::of(ptr::PTR_ARG),
101101
LintId::of(ptr_eq::PTR_EQ),

clippy_lints/src/lib.register_suspicious.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
store.register_group(true, "clippy::suspicious", Some("clippy_suspicious"), vec![
66
LintId::of(almost_complete_letter_range::ALMOST_COMPLETE_LETTER_RANGE),
7-
LintId::of(assign_ops::MISREFACTORED_ASSIGN_OP),
87
LintId::of(attrs::BLANKET_CLIPPY_RESTRICTION_LINTS),
98
LintId::of(await_holding_invalid::AWAIT_HOLDING_INVALID_TYPE),
109
LintId::of(await_holding_invalid::AWAIT_HOLDING_LOCK),
@@ -29,6 +28,7 @@ store.register_group(true, "clippy::suspicious", Some("clippy_suspicious"), vec!
2928
LintId::of(methods::SUSPICIOUS_MAP),
3029
LintId::of(mut_key::MUTABLE_KEY_TYPE),
3130
LintId::of(octal_escapes::OCTAL_ESCAPES),
31+
LintId::of(operators::MISREFACTORED_ASSIGN_OP),
3232
LintId::of(rc_clone_in_vec_init::RC_CLONE_IN_VEC_INIT),
3333
LintId::of(suspicious_trait_impl::SUSPICIOUS_ARITHMETIC_IMPL),
3434
LintId::of(suspicious_trait_impl::SUSPICIOUS_OP_ASSIGN_IMPL),

clippy_lints/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ mod as_conversions;
173173
mod as_underscore;
174174
mod asm_syntax;
175175
mod assertions_on_constants;
176-
mod assign_ops;
177176
mod async_yields_async;
178177
mod attrs;
179178
mod await_holding_invalid;
@@ -675,7 +674,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
675674
store.register_late_pass(move || Box::new(doc::DocMarkdown::new(doc_valid_idents.clone())));
676675
store.register_late_pass(|| Box::new(neg_multiply::NegMultiply));
677676
store.register_late_pass(|| Box::new(mem_forget::MemForget));
678-
store.register_late_pass(|| Box::new(assign_ops::AssignOps));
679677
store.register_late_pass(|| Box::new(let_if_seq::LetIfSeq));
680678
store.register_late_pass(|| Box::new(mixed_read_write_in_expression::EvalOrderDependence));
681679
store.register_late_pass(|| Box::new(missing_doc::MissingDoc::new()));

0 commit comments

Comments
 (0)