about summary refs log tree commit diff
path: root/clippy_utils
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-06-03 17:10:51 +0200
committerGitHub <noreply@github.com>2022-06-03 17:10:51 +0200
commit57304823dbd1c246d1166e85c156e694d2f7a184 (patch)
tree10933d053ab9240962948274f3ea2d9f34687c18 /clippy_utils
parentbaacbfda45c4f7b6c679ac7d03d374b0a1d58391 (diff)
parent1e86cc5194eca009519b9631d081867366fe5c44 (diff)
downloadrust-57304823dbd1c246d1166e85c156e694d2f7a184.tar.gz
rust-57304823dbd1c246d1166e85c156e694d2f7a184.zip
Rollup merge of #97415 - cjgillot:is-late-bound-solo, r=estebank
Compute `is_late_bound_map` query separately from lifetime resolution

This query is actually very simple, and is only useful for functions and method.  It can be computed directly by fetching the HIR, with no need to embed it within the lifetime resolution visitor.

Based on https://github.com/rust-lang/rust/pull/96296
Diffstat (limited to 'clippy_utils')
-rw-r--r--clippy_utils/src/hir_utils.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/clippy_utils/src/hir_utils.rs b/clippy_utils/src/hir_utils.rs
index c440793b90e..fc1a4e1f602 100644
--- a/clippy_utils/src/hir_utils.rs
+++ b/clippy_utils/src/hir_utils.rs
@@ -902,16 +902,14 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
 
     pub fn hash_lifetime(&mut self, lifetime: Lifetime) {
         std::mem::discriminant(&lifetime.name).hash(&mut self.s);
-        if let LifetimeName::Param(ref name) = lifetime.name {
+        if let LifetimeName::Param(param_id, ref name) = lifetime.name {
             std::mem::discriminant(name).hash(&mut self.s);
+            param_id.hash(&mut self.s);
             match name {
                 ParamName::Plain(ref ident) => {
                     ident.name.hash(&mut self.s);
                 },
-                ParamName::Fresh(ref size) => {
-                    size.hash(&mut self.s);
-                },
-                ParamName::Error => {},
+                ParamName::Fresh | ParamName::Error => {},
             }
         }
     }