mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
rename
This commit is contained in:
parent
53c12e085a
commit
8ca900b01c
7 changed files with 9 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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| {
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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)]
|
||||
|
|
Loading…
Reference in a new issue