about summary refs log tree commit diff
path: root/compiler/rustc_query_impl
diff options
context:
space:
mode:
authorb-naber <bn263@gmx.de>2022-04-21 16:37:24 +0200
committerb-naber <bn263@gmx.de>2022-04-21 16:37:24 +0200
commit28af967bb9165999294250dc3f3a56c2193c35d9 (patch)
tree4bcf75ebc87cacb01617a41da466405ab771e8b7 /compiler/rustc_query_impl
parent1157dc7167d13a9bdcafd30b8ad0ecf5ae5faa7f (diff)
downloadrust-28af967bb9165999294250dc3f3a56c2193c35d9.tar.gz
rust-28af967bb9165999294250dc3f3a56c2193c35d9.zip
implement (as of now still unused) query for valtree -> constvalue conversion
Diffstat (limited to 'compiler/rustc_query_impl')
-rw-r--r--compiler/rustc_query_impl/src/keys.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_query_impl/src/keys.rs b/compiler/rustc_query_impl/src/keys.rs
index f1f83a7299c..3f0f856b5dd 100644
--- a/compiler/rustc_query_impl/src/keys.rs
+++ b/compiler/rustc_query_impl/src/keys.rs
@@ -502,3 +502,14 @@ impl<'tcx> Key for (ty::Instance<'tcx>, &'tcx ty::List<Ty<'tcx>>) {
         self.0.default_span(tcx)
     }
 }
+
+impl<'tcx> Key for (Ty<'tcx>, ty::ValTree<'tcx>) {
+    #[inline(always)]
+    fn query_crate_is_local(&self) -> bool {
+        true
+    }
+
+    fn default_span(&self, _: TyCtxt<'_>) -> Span {
+        DUMMY_SP
+    }
+}