about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Bastian <robertbastian@google.com>2023-01-10 11:12:54 +0100
committerRobert Bastian <robertbastian@google.com>2023-01-10 11:12:54 +0100
commit8ca900b01ce5ff90511fd9d02c29e50a89fcccf0 (patch)
tree40c2f8a161ffe11faa9267222664d58513be1d57
parent53c12e085ab9595dff369f26046038afa20e8e5c (diff)
downloadrust-8ca900b01ce5ff90511fd9d02c29e50a89fcccf0.tar.gz
rust-8ca900b01ce5ff90511fd9d02c29e50a89fcccf0.zip
rename
-rw-r--r--CHANGELOG.md1
-rw-r--r--clippy_lints/src/declared_lints.rs2
-rw-r--r--clippy_lints/src/derive.rs8
-rw-r--r--clippy_lints/src/renamed_lints.rs1
-rw-r--r--tests/ui/derived_hash_with_manual_eq.rs (renamed from tests/ui/derive_hash_xor_eq.rs)0
-rw-r--r--tests/ui/derived_hash_with_manual_eq.stderr (renamed from tests/ui/derive_hash_xor_eq.stderr)0
-rw-r--r--tests/ui/rename.rs2
7 files changed, 9 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 02f3188f8be..8e31e8f0d98 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4137,6 +4137,7 @@ Released 2018-09-13
 [`derive_hash_xor_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
 [`derive_ord_xor_partial_ord`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord
 [`derive_partial_eq_without_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
+[`derived_hash_with_manual_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#derived_hash_with_manual_eq
 [`disallowed_macros`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
 [`disallowed_method`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_method
 [`disallowed_methods`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods
diff --git a/clippy_lints/src/declared_lints.rs b/clippy_lints/src/declared_lints.rs
index 2982460c9cf..91ca73633f0 100644
--- a/clippy_lints/src/declared_lints.rs
+++ b/clippy_lints/src/declared_lints.rs
@@ -111,7 +111,7 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
     crate::dereference::NEEDLESS_BORROW_INFO,
     crate::dereference::REF_BINDING_TO_REFERENCE_INFO,
     crate::derivable_impls::DERIVABLE_IMPLS_INFO,
-    crate::derive::DERIVE_HASH_XOR_EQ_INFO,
+    crate::derive::DERIVED_HASH_WITH_MANUAL_EQ_INFO,
     crate::derive::DERIVE_ORD_XOR_PARTIAL_ORD_INFO,
     crate::derive::DERIVE_PARTIAL_EQ_WITHOUT_EQ_INFO,
     crate::derive::EXPL_IMPL_CLONE_ON_COPY_INFO,
diff --git a/clippy_lints/src/derive.rs b/clippy_lints/src/derive.rs
index e39a31a8c72..983a517bc12 100644
--- a/clippy_lints/src/derive.rs
+++ b/clippy_lints/src/derive.rs
@@ -46,7 +46,7 @@ declare_clippy_lint! {
     /// }
     /// ```
     #[clippy::version = "pre 1.29.0"]
-    pub DERIVE_HASH_XOR_EQ,
+    pub DERIVED_HASH_WITH_MANUAL_EQ,
     correctness,
     "deriving `Hash` but implementing `PartialEq` explicitly"
 }
@@ -197,7 +197,7 @@ declare_clippy_lint! {
 
 declare_lint_pass!(Derive => [
     EXPL_IMPL_CLONE_ON_COPY,
-    DERIVE_HASH_XOR_EQ,
+    DERIVED_HASH_WITH_MANUAL_EQ,
     DERIVE_ORD_XOR_PARTIAL_ORD,
     UNSAFE_DERIVE_DESERIALIZE,
     DERIVE_PARTIAL_EQ_WITHOUT_EQ
@@ -226,7 +226,7 @@ impl<'tcx> LateLintPass<'tcx> for Derive {
     }
 }
 
-/// Implementation of the `DERIVE_HASH_XOR_EQ` lint.
+/// Implementation of the `DERIVED_HASH_WITH_MANUAL_EQ` lint.
 fn check_hash_peq<'tcx>(
     cx: &LateContext<'tcx>,
     span: Span,
@@ -254,7 +254,7 @@ fn check_hash_peq<'tcx>(
                 if trait_ref.substs.type_at(1) == ty {
                     span_lint_and_then(
                         cx,
-                        DERIVE_HASH_XOR_EQ,
+                        DERIVED_HASH_WITH_MANUAL_EQ,
                         span,
                         "you are deriving `Hash` but have implemented `PartialEq` explicitly",
                         |diag| {
diff --git a/clippy_lints/src/renamed_lints.rs b/clippy_lints/src/renamed_lints.rs
index 72c25592609..9f487dedb8c 100644
--- a/clippy_lints/src/renamed_lints.rs
+++ b/clippy_lints/src/renamed_lints.rs
@@ -9,6 +9,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[
     ("clippy::box_vec", "clippy::box_collection"),
     ("clippy::const_static_lifetime", "clippy::redundant_static_lifetimes"),
     ("clippy::cyclomatic_complexity", "clippy::cognitive_complexity"),
+    ("clippy::derive_hash_xor_eq", "clippy::derived_hash_with_manual_eq"),
     ("clippy::disallowed_method", "clippy::disallowed_methods"),
     ("clippy::disallowed_type", "clippy::disallowed_types"),
     ("clippy::eval_order_dependence", "clippy::mixed_read_write_in_expression"),
diff --git a/tests/ui/derive_hash_xor_eq.rs b/tests/ui/derived_hash_with_manual_eq.rs
index 0804e3cffa1..0804e3cffa1 100644
--- a/tests/ui/derive_hash_xor_eq.rs
+++ b/tests/ui/derived_hash_with_manual_eq.rs
diff --git a/tests/ui/derive_hash_xor_eq.stderr b/tests/ui/derived_hash_with_manual_eq.stderr
index 16965aa42d8..16965aa42d8 100644
--- a/tests/ui/derive_hash_xor_eq.stderr
+++ b/tests/ui/derived_hash_with_manual_eq.stderr
diff --git a/tests/ui/rename.rs b/tests/ui/rename.rs
index 699c0ff464e..64bc1ca7116 100644
--- a/tests/ui/rename.rs
+++ b/tests/ui/rename.rs
@@ -10,6 +10,7 @@
 #![allow(clippy::box_collection)]
 #![allow(clippy::redundant_static_lifetimes)]
 #![allow(clippy::cognitive_complexity)]
+#![allow(clippy::derived_hash_with_manual_eq)]
 #![allow(clippy::disallowed_methods)]
 #![allow(clippy::disallowed_types)]
 #![allow(clippy::mixed_read_write_in_expression)]
@@ -45,6 +46,7 @@
 #![warn(clippy::box_vec)]
 #![warn(clippy::const_static_lifetime)]
 #![warn(clippy::cyclomatic_complexity)]
+#![warn(clippy::derive_hash_xor_eq)]
 #![warn(clippy::disallowed_method)]
 #![warn(clippy::disallowed_type)]
 #![warn(clippy::eval_order_dependence)]