about summary refs log tree commit diff
path: root/clippy_lints/src/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-02 12:05:27 +0000
committerbors <bors@rust-lang.org>2022-06-02 12:05:27 +0000
commit9428e2e25e95009648b63fa142e85f643a6fbf2d (patch)
treebae69a37868ce5ebce8ebd223b28c9a75951098c /clippy_lints/src/lib.rs
parent0d5ace3ed22fdd6ee25ee1dda42139d36c0aeec4 (diff)
parent4fc0ee6260d686efc128e44b7b0d0e3d820fff20 (diff)
Auto merge of #8905 - c410-f3r:arith, r=llogiq
[1/N] Implement Arithmetic lint

Assuming that https://github.com/rust-lang/rust-clippy/issues/8903 is OK, this PR starts the creation of the `Arithmetic` lint with configurable types.

My current struggle to get a rustc review inspired me to create smaller PRs in order to easy review and make merges as fast as possible. So the first step here only moves the `arithmetic.rs` file to `numeric_arithmetic.rs` to make room for the new lint.

--
changelog: none
Diffstat (limited to 'clippy_lints/src/lib.rs')
-rw-r--r--clippy_lints/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs
index 8f7c99d011d..89b65ce5469 100644
--- a/clippy_lints/src/lib.rs
+++ b/clippy_lints/src/lib.rs
@@ -170,7 +170,6 @@ mod renamed_lints;
 mod absurd_extreme_comparisons;
 mod almost_complete_letter_range;
 mod approx_const;
-mod arithmetic;
 mod as_conversions;
 mod asm_syntax;
 mod assertions_on_constants;
@@ -331,6 +330,7 @@ mod non_expressive_names;
 mod non_octal_unix_permissions;
 mod non_send_fields_in_send_ty;
 mod nonstandard_macro_braces;
+mod numeric_arithmetic;
 mod octal_escapes;
 mod only_used_in_recursion;
 mod open_options;
@@ -683,7 +683,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
     store.register_late_pass(move || Box::new(doc::DocMarkdown::new(doc_valid_idents.clone())));
     store.register_late_pass(|| Box::new(neg_multiply::NegMultiply));
     store.register_late_pass(|| Box::new(mem_forget::MemForget));
-    store.register_late_pass(|| Box::new(arithmetic::Arithmetic::default()));
+    store.register_late_pass(|| Box::new(numeric_arithmetic::NumericArithmetic::default()));
     store.register_late_pass(|| Box::new(assign_ops::AssignOps));
     store.register_late_pass(|| Box::new(let_if_seq::LetIfSeq));
     store.register_late_pass(|| Box::new(mixed_read_write_in_expression::EvalOrderDependence));