Skip to content

Commit 42492ec

Browse files
committed
Move AssignOps into Operators lint pass
1 parent 6f37100 commit 42492ec

File tree

9 files changed

+255
-237
lines changed

9 files changed

+255
-237
lines changed

clippy_lints/src/assign_ops.rs

Lines changed: 0 additions & 229 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),
@@ -253,6 +251,8 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
253251
LintId::of(octal_escapes::OCTAL_ESCAPES),
254252
LintId::of(open_options::NONSENSICAL_OPEN_OPTIONS),
255253
LintId::of(operators::ABSURD_EXTREME_COMPARISONS),
254+
LintId::of(operators::ASSIGN_OP_PATTERN),
255+
LintId::of(operators::MISREFACTORED_ASSIGN_OP),
256256
LintId::of(option_env_unwrap::OPTION_ENV_UNWRAP),
257257
LintId::of(overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL),
258258
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
@@ -39,8 +39,6 @@ store.register_lints(&[
3939
asm_syntax::INLINE_ASM_X86_ATT_SYNTAX,
4040
asm_syntax::INLINE_ASM_X86_INTEL_SYNTAX,
4141
assertions_on_constants::ASSERTIONS_ON_CONSTANTS,
42-
assign_ops::ASSIGN_OP_PATTERN,
43-
assign_ops::MISREFACTORED_ASSIGN_OP,
4442
async_yields_async::ASYNC_YIELDS_ASYNC,
4543
attrs::ALLOW_ATTRIBUTES_WITHOUT_REASON,
4644
attrs::BLANKET_CLIPPY_RESTRICTION_LINTS,
@@ -423,8 +421,10 @@ store.register_lints(&[
423421
only_used_in_recursion::ONLY_USED_IN_RECURSION,
424422
open_options::NONSENSICAL_OPEN_OPTIONS,
425423
operators::ABSURD_EXTREME_COMPARISONS,
424+
operators::ASSIGN_OP_PATTERN,
426425
operators::FLOAT_ARITHMETIC,
427426
operators::INTEGER_ARITHMETIC,
427+
operators::MISREFACTORED_ASSIGN_OP,
428428
option_env_unwrap::OPTION_ENV_UNWRAP,
429429
option_if_let_else::OPTION_IF_LET_ELSE,
430430
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),
@@ -28,6 +27,7 @@ store.register_group(true, "clippy::suspicious", Some("clippy_suspicious"), vec!
2827
LintId::of(methods::SUSPICIOUS_MAP),
2928
LintId::of(mut_key::MUTABLE_KEY_TYPE),
3029
LintId::of(octal_escapes::OCTAL_ESCAPES),
30+
LintId::of(operators::MISREFACTORED_ASSIGN_OP),
3131
LintId::of(rc_clone_in_vec_init::RC_CLONE_IN_VEC_INIT),
3232
LintId::of(significant_drop_in_scrutinee::SIGNIFICANT_DROP_IN_SCRUTINEE),
3333
LintId::of(suspicious_trait_impl::SUSPICIOUS_ARITHMETIC_IMPL),

clippy_lints/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ mod approx_const;
172172
mod as_conversions;
173173
mod asm_syntax;
174174
mod assertions_on_constants;
175-
mod assign_ops;
176175
mod async_yields_async;
177176
mod attrs;
178177
mod await_holding_invalid;
@@ -678,7 +677,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
678677
store.register_late_pass(move || Box::new(doc::DocMarkdown::new(doc_valid_idents.clone())));
679678
store.register_late_pass(|| Box::new(neg_multiply::NegMultiply));
680679
store.register_late_pass(|| Box::new(mem_forget::MemForget));
681-
store.register_late_pass(|| Box::new(assign_ops::AssignOps));
682680
store.register_late_pass(|| Box::new(let_if_seq::LetIfSeq));
683681
store.register_late_pass(|| Box::new(mixed_read_write_in_expression::EvalOrderDependence));
684682
store.register_late_pass(|| Box::new(missing_doc::MissingDoc::new()));

0 commit comments

Comments
 (0)