about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/lib.register_lints.rs4
-rw-r--r--clippy_lints/src/lib.register_restriction.rs4
-rw-r--r--clippy_lints/src/lib.rs4
-rw-r--r--clippy_lints/src/numeric_arithmetic.rs (renamed from clippy_lints/src/arithmetic.rs)6
4 files changed, 9 insertions, 9 deletions
diff --git a/clippy_lints/src/lib.register_lints.rs b/clippy_lints/src/lib.register_lints.rs
index 93f27187b71..ea8040a319b 100644
--- a/clippy_lints/src/lib.register_lints.rs
+++ b/clippy_lints/src/lib.register_lints.rs
@@ -36,8 +36,6 @@ store.register_lints(&[
     absurd_extreme_comparisons::ABSURD_EXTREME_COMPARISONS,
     almost_complete_letter_range::ALMOST_COMPLETE_LETTER_RANGE,
     approx_const::APPROX_CONSTANT,
-    arithmetic::FLOAT_ARITHMETIC,
-    arithmetic::INTEGER_ARITHMETIC,
     as_conversions::AS_CONVERSIONS,
     asm_syntax::INLINE_ASM_X86_ATT_SYNTAX,
     asm_syntax::INLINE_ASM_X86_INTEL_SYNTAX,
@@ -423,6 +421,8 @@ store.register_lints(&[
     non_octal_unix_permissions::NON_OCTAL_UNIX_PERMISSIONS,
     non_send_fields_in_send_ty::NON_SEND_FIELDS_IN_SEND_TY,
     nonstandard_macro_braces::NONSTANDARD_MACRO_BRACES,
+    numeric_arithmetic::FLOAT_ARITHMETIC,
+    numeric_arithmetic::INTEGER_ARITHMETIC,
     octal_escapes::OCTAL_ESCAPES,
     only_used_in_recursion::ONLY_USED_IN_RECURSION,
     open_options::NONSENSICAL_OPEN_OPTIONS,
diff --git a/clippy_lints/src/lib.register_restriction.rs b/clippy_lints/src/lib.register_restriction.rs
index a6d3a06dc16..304b595541a 100644
--- a/clippy_lints/src/lib.register_restriction.rs
+++ b/clippy_lints/src/lib.register_restriction.rs
@@ -3,8 +3,6 @@
 // Manual edits will be overwritten.
 
 store.register_group(true, "clippy::restriction", Some("clippy_restriction"), vec![
-    LintId::of(arithmetic::FLOAT_ARITHMETIC),
-    LintId::of(arithmetic::INTEGER_ARITHMETIC),
     LintId::of(as_conversions::AS_CONVERSIONS),
     LintId::of(asm_syntax::INLINE_ASM_X86_ATT_SYNTAX),
     LintId::of(asm_syntax::INLINE_ASM_X86_INTEL_SYNTAX),
@@ -50,6 +48,8 @@ store.register_group(true, "clippy::restriction", Some("clippy_restriction"), ve
     LintId::of(module_style::MOD_MODULE_FILES),
     LintId::of(module_style::SELF_NAMED_MODULE_FILES),
     LintId::of(modulo_arithmetic::MODULO_ARITHMETIC),
+    LintId::of(numeric_arithmetic::FLOAT_ARITHMETIC),
+    LintId::of(numeric_arithmetic::INTEGER_ARITHMETIC),
     LintId::of(panic_in_result_fn::PANIC_IN_RESULT_FN),
     LintId::of(panic_unimplemented::PANIC),
     LintId::of(panic_unimplemented::TODO),
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));
diff --git a/clippy_lints/src/arithmetic.rs b/clippy_lints/src/numeric_arithmetic.rs
index c5948707c81..5c4de338149 100644
--- a/clippy_lints/src/arithmetic.rs
+++ b/clippy_lints/src/numeric_arithmetic.rs
@@ -51,16 +51,16 @@ declare_clippy_lint! {
 }
 
 #[derive(Copy, Clone, Default)]
-pub struct Arithmetic {
+pub struct NumericArithmetic {
     expr_span: Option<Span>,
     /// This field is used to check whether expressions are constants, such as in enum discriminants
     /// and consts
     const_span: Option<Span>,
 }
 
-impl_lint_pass!(Arithmetic => [INTEGER_ARITHMETIC, FLOAT_ARITHMETIC]);
+impl_lint_pass!(NumericArithmetic => [INTEGER_ARITHMETIC, FLOAT_ARITHMETIC]);
 
-impl<'tcx> LateLintPass<'tcx> for Arithmetic {
+impl<'tcx> LateLintPass<'tcx> for NumericArithmetic {
     fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) {
         if self.expr_span.is_some() {
             return;