about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2021-10-07 11:29:01 +0200
committerMichael Woerister <michaelwoerister@posteo.de>2021-10-07 20:03:00 +0200
commitb7cc99142ad0cfe47e2fe9f7a82eaf5b672c0573 (patch)
tree9a855bc4022a32a3498651a8fbc138dd595b40ea /compiler/rustc_query_impl/src
parenta1e2c0f0ad9e787b5ff2844112fc2324511adf34 (diff)
downloadrust-b7cc99142ad0cfe47e2fe9f7a82eaf5b672c0573.tar.gz
rust-b7cc99142ad0cfe47e2fe9f7a82eaf5b672c0573.zip
Turn tcx.vtable_allocation() into a query.
Diffstat (limited to 'compiler/rustc_query_impl/src')
-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 563a3cf1438..34489287596 100644
--- a/compiler/rustc_query_impl/src/keys.rs
+++ b/compiler/rustc_query_impl/src/keys.rs
@@ -72,6 +72,17 @@ impl<'tcx> Key for mir::interpret::GlobalId<'tcx> {
     }
 }
 
+impl<'tcx> Key for (Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>) {
+    #[inline(always)]
+    fn query_crate_is_local(&self) -> bool {
+        true
+    }
+
+    fn default_span(&self, _: TyCtxt<'_>) -> Span {
+        DUMMY_SP
+    }
+}
+
 impl<'tcx> Key for mir::interpret::LitToConstInput<'tcx> {
     #[inline(always)]
     fn query_crate_is_local(&self) -> bool {