Skip to content

Commit 8ca900b

Browse files
committed
rename
1 parent 53c12e0 commit 8ca900b

7 files changed

+9
-5
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4137,6 +4137,7 @@ Released 2018-09-13
41374137
[`derive_hash_xor_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
41384138
[`derive_ord_xor_partial_ord`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord
41394139
[`derive_partial_eq_without_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
4140+
[`derived_hash_with_manual_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#derived_hash_with_manual_eq
41404141
[`disallowed_macros`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
41414142
[`disallowed_method`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_method
41424143
[`disallowed_methods`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods

clippy_lints/src/declared_lints.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
111111
crate::dereference::NEEDLESS_BORROW_INFO,
112112
crate::dereference::REF_BINDING_TO_REFERENCE_INFO,
113113
crate::derivable_impls::DERIVABLE_IMPLS_INFO,
114-
crate::derive::DERIVE_HASH_XOR_EQ_INFO,
114+
crate::derive::DERIVED_HASH_WITH_MANUAL_EQ_INFO,
115115
crate::derive::DERIVE_ORD_XOR_PARTIAL_ORD_INFO,
116116
crate::derive::DERIVE_PARTIAL_EQ_WITHOUT_EQ_INFO,
117117
crate::derive::EXPL_IMPL_CLONE_ON_COPY_INFO,

clippy_lints/src/derive.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ declare_clippy_lint! {
4646
/// }
4747
/// ```
4848
#[clippy::version = "pre 1.29.0"]
49-
pub DERIVE_HASH_XOR_EQ,
49+
pub DERIVED_HASH_WITH_MANUAL_EQ,
5050
correctness,
5151
"deriving `Hash` but implementing `PartialEq` explicitly"
5252
}
@@ -197,7 +197,7 @@ declare_clippy_lint! {
197197

198198
declare_lint_pass!(Derive => [
199199
EXPL_IMPL_CLONE_ON_COPY,
200-
DERIVE_HASH_XOR_EQ,
200+
DERIVED_HASH_WITH_MANUAL_EQ,
201201
DERIVE_ORD_XOR_PARTIAL_ORD,
202202
UNSAFE_DERIVE_DESERIALIZE,
203203
DERIVE_PARTIAL_EQ_WITHOUT_EQ
@@ -226,7 +226,7 @@ impl<'tcx> LateLintPass<'tcx> for Derive {
226226
}
227227
}
228228

229-
/// Implementation of the `DERIVE_HASH_XOR_EQ` lint.
229+
/// Implementation of the `DERIVED_HASH_WITH_MANUAL_EQ` lint.
230230
fn check_hash_peq<'tcx>(
231231
cx: &LateContext<'tcx>,
232232
span: Span,
@@ -254,7 +254,7 @@ fn check_hash_peq<'tcx>(
254254
if trait_ref.substs.type_at(1) == ty {
255255
span_lint_and_then(
256256
cx,
257-
DERIVE_HASH_XOR_EQ,
257+
DERIVED_HASH_WITH_MANUAL_EQ,
258258
span,
259259
"you are deriving `Hash` but have implemented `PartialEq` explicitly",
260260
|diag| {

clippy_lints/src/renamed_lints.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[
99
("clippy::box_vec", "clippy::box_collection"),
1010
("clippy::const_static_lifetime", "clippy::redundant_static_lifetimes"),
1111
("clippy::cyclomatic_complexity", "clippy::cognitive_complexity"),
12+
("clippy::derive_hash_xor_eq", "clippy::derived_hash_with_manual_eq"),
1213
("clippy::disallowed_method", "clippy::disallowed_methods"),
1314
("clippy::disallowed_type", "clippy::disallowed_types"),
1415
("clippy::eval_order_dependence", "clippy::mixed_read_write_in_expression"),

tests/ui/rename.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#![allow(clippy::box_collection)]
1111
#![allow(clippy::redundant_static_lifetimes)]
1212
#![allow(clippy::cognitive_complexity)]
13+
#![allow(clippy::derived_hash_with_manual_eq)]
1314
#![allow(clippy::disallowed_methods)]
1415
#![allow(clippy::disallowed_types)]
1516
#![allow(clippy::mixed_read_write_in_expression)]
@@ -45,6 +46,7 @@
4546
#![warn(clippy::box_vec)]
4647
#![warn(clippy::const_static_lifetime)]
4748
#![warn(clippy::cyclomatic_complexity)]
49+
#![warn(clippy::derive_hash_xor_eq)]
4850
#![warn(clippy::disallowed_method)]
4951
#![warn(clippy::disallowed_type)]
5052
#![warn(clippy::eval_order_dependence)]

0 commit comments

Comments
 (0)