about summary refs log tree commit diff
path: root/compiler/rustc_query_impl
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2022-07-12 09:10:22 -0500
committerCameron Steffen <cam.steffen94@gmail.com>2022-07-30 15:59:17 -0500
commitcf2433a74f7474f7d41e9842d7de465b0966831a (patch)
tree052e864c933d409ad398e7e146fecbafd287a63b /compiler/rustc_query_impl
parent1202bbaf48a0a919a2e0cfd8b7dce97e8fc3030d (diff)
downloadrust-cf2433a74f7474f7d41e9842d7de465b0966831a.tar.gz
rust-cf2433a74f7474f7d41e9842d7de465b0966831a.zip
Use LocalDefId for closures more
Diffstat (limited to 'compiler/rustc_query_impl')
-rw-r--r--compiler/rustc_query_impl/src/keys.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_query_impl/src/keys.rs b/compiler/rustc_query_impl/src/keys.rs
index 54774314313..49175e97f41 100644
--- a/compiler/rustc_query_impl/src/keys.rs
+++ b/compiler/rustc_query_impl/src/keys.rs
@@ -191,6 +191,16 @@ impl Key for (LocalDefId, DefId) {
     }
 }
 
+impl Key for (LocalDefId, LocalDefId) {
+    #[inline(always)]
+    fn query_crate_is_local(&self) -> bool {
+        true
+    }
+    fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
+        self.0.default_span(tcx)
+    }
+}
+
 impl Key for (DefId, Option<Ident>) {
     #[inline(always)]
     fn query_crate_is_local(&self) -> bool {