about summary refs log tree commit diff
path: root/compiler/rustc_query_impl
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <eddyb@lyken.rs>2021-09-02 00:29:15 +0300
committerEduard-Mihai Burtescu <eddyb@lyken.rs>2021-09-18 04:41:33 +0300
commitc1837ef1c58edd48c81341126ecc94e7adc5bd3d (patch)
tree8161e4e2ad2b849b952a6e7718582016ac4f3a50 /compiler/rustc_query_impl
parente9b68304efc447a7bcd35b06511f6dfdfe9da16d (diff)
downloadrust-c1837ef1c58edd48c81341126ecc94e7adc5bd3d.tar.gz
rust-c1837ef1c58edd48c81341126ecc94e7adc5bd3d.zip
Querify `fn_abi_of_{fn_ptr,instance}`.
Diffstat (limited to 'compiler/rustc_query_impl')
-rw-r--r--compiler/rustc_query_impl/src/keys.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/compiler/rustc_query_impl/src/keys.rs b/compiler/rustc_query_impl/src/keys.rs
index 42e8b4023cf..563a3cf1438 100644
--- a/compiler/rustc_query_impl/src/keys.rs
+++ b/compiler/rustc_query_impl/src/keys.rs
@@ -449,3 +449,25 @@ impl<'tcx> Key for (ty::Predicate<'tcx>, traits::WellFormedLoc) {
         DUMMY_SP
     }
 }
+
+impl<'tcx> Key for (ty::PolyFnSig<'tcx>, &'tcx ty::List<Ty<'tcx>>) {
+    #[inline(always)]
+    fn query_crate_is_local(&self) -> bool {
+        true
+    }
+
+    fn default_span(&self, _: TyCtxt<'_>) -> Span {
+        DUMMY_SP
+    }
+}
+
+impl<'tcx> Key for (ty::Instance<'tcx>, &'tcx ty::List<Ty<'tcx>>) {
+    #[inline(always)]
+    fn query_crate_is_local(&self) -> bool {
+        true
+    }
+
+    fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
+        self.0.default_span(tcx)
+    }
+}