Skip to content

Commit 751131b

Browse files
committed
Move AssignOps into Operators lint pass
1 parent 448b6f4 commit 751131b

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),
@@ -260,6 +258,8 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
260258
LintId::of(octal_escapes::OCTAL_ESCAPES),
261259
LintId::of(open_options::NONSENSICAL_OPEN_OPTIONS),
262260
LintId::of(operators::ABSURD_EXTREME_COMPARISONS),
261+
LintId::of(operators::ASSIGN_OP_PATTERN),
262+
LintId::of(operators::MISREFACTORED_ASSIGN_OP),
263263
LintId::of(option_env_unwrap::OPTION_ENV_UNWRAP),
264264
LintId::of(overflow_check_conditional::OVERFLOW_CHECK_CONDITIONAL),
265265
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
@@ -42,8 +42,6 @@ store.register_lints(&[
4242
asm_syntax::INLINE_ASM_X86_ATT_SYNTAX,
4343
asm_syntax::INLINE_ASM_X86_INTEL_SYNTAX,
4444
assertions_on_constants::ASSERTIONS_ON_CONSTANTS,
45-
assign_ops::ASSIGN_OP_PATTERN,
46-
assign_ops::MISREFACTORED_ASSIGN_OP,
4745
async_yields_async::ASYNC_YIELDS_ASYNC,
4846
attrs::ALLOW_ATTRIBUTES_WITHOUT_REASON,
4947
attrs::BLANKET_CLIPPY_RESTRICTION_LINTS,
@@ -435,8 +433,10 @@ store.register_lints(&[
435433
only_used_in_recursion::ONLY_USED_IN_RECURSION,
436434
open_options::NONSENSICAL_OPEN_OPTIONS,
437435
operators::ABSURD_EXTREME_COMPARISONS,
436+
operators::ASSIGN_OP_PATTERN,
438437
operators::FLOAT_ARITHMETIC,
439438
operators::INTEGER_ARITHMETIC,
439+
operators::MISREFACTORED_ASSIGN_OP,
440440
option_env_unwrap::OPTION_ENV_UNWRAP,
441441
option_if_let_else::OPTION_IF_LET_ELSE,
442442
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),
@@ -98,6 +97,7 @@ store.register_group(true, "clippy::style", Some("clippy_style"), vec![
9897
LintId::of(non_copy_const::BORROW_INTERIOR_MUTABLE_CONST),
9998
LintId::of(non_copy_const::DECLARE_INTERIOR_MUTABLE_CONST),
10099
LintId::of(non_expressive_names::JUST_UNDERSCORES_AND_DIGITS),
100+
LintId::of(operators::ASSIGN_OP_PATTERN),
101101
LintId::of(ptr::CMP_NULL),
102102
LintId::of(ptr::PTR_ARG),
103103
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
@@ -174,7 +174,6 @@ mod as_conversions;
174174
mod as_underscore;
175175
mod asm_syntax;
176176
mod assertions_on_constants;
177-
mod assign_ops;
178177
mod async_yields_async;
179178
mod attrs;
180179
mod await_holding_invalid;
@@ -704,7 +703,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
704703
store.register_late_pass(move || Box::new(doc::DocMarkdown::new(doc_valid_idents.clone())));
705704
store.register_late_pass(|| Box::new(neg_multiply::NegMultiply));
706705
store.register_late_pass(|| Box::new(mem_forget::MemForget));
707-
store.register_late_pass(|| Box::new(assign_ops::AssignOps));
708706
store.register_late_pass(|| Box::new(let_if_seq::LetIfSeq));
709707
store.register_late_pass(|| Box::new(mixed_read_write_in_expression::EvalOrderDependence));
710708
store.register_late_pass(|| Box::new(missing_doc::MissingDoc::new()));

0 commit comments

Comments
 (0)