about summary refs log tree commit diff
path: root/clippy_lints/src/incorrect_impls.rs
diff options
context:
space:
mode:
authorJason Newcomb <jsnewcomb@pm.me>2023-07-30 01:11:08 -0400
committerJason Newcomb <jsnewcomb@pm.me>2023-07-30 01:19:29 -0400
commit4d80a2ed2e1cd6df90f89d8f39bdfba06c8632fe (patch)
treebaa7ea2637e1eede51b69f6a45986afdefad4f2f /clippy_lints/src/incorrect_impls.rs
parent71cc39e1f2f4cd7e8cd6fa09c65ecab06ce9cc80 (diff)
downloadrust-4d80a2ed2e1cd6df90f89d8f39bdfba06c8632fe.tar.gz
rust-4d80a2ed2e1cd6df90f89d8f39bdfba06c8632fe.zip
Rework `redundant_closure`
* Better track when a early-bound region appears when a late-bound region is required
* Don't lint when the closure gives explicit types.
Diffstat (limited to 'clippy_lints/src/incorrect_impls.rs')
-rw-r--r--clippy_lints/src/incorrect_impls.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/clippy_lints/src/incorrect_impls.rs b/clippy_lints/src/incorrect_impls.rs
index f4edb17ae80..c19a46f4e97 100644
--- a/clippy_lints/src/incorrect_impls.rs
+++ b/clippy_lints/src/incorrect_impls.rs
@@ -189,7 +189,6 @@ impl LateLintPass<'_> for IncorrectImpls {
                 .diagnostic_items(trait_impl.def_id.krate)
                 .name_to_id
                 .get(&sym::Ord)
-            && trait_impl.self_ty() == trait_impl.args.type_at(1)
             && implements_trait(cx, hir_ty_to_ty(cx.tcx, imp.self_ty), *ord_def_id, &[])
         {
             // If the `cmp` call likely needs to be fully qualified in the suggestion