From 97214eecc5a6c35c6cd8d9798207175cc2e15812 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Wed, 1 Sep 2021 23:04:28 +0100 Subject: Add query `own_existential_vtable_entries` --- compiler/rustc_query_impl/src/keys.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compiler/rustc_query_impl/src') diff --git a/compiler/rustc_query_impl/src/keys.rs b/compiler/rustc_query_impl/src/keys.rs index c973eae6b06..42e8b4023cf 100644 --- a/compiler/rustc_query_impl/src/keys.rs +++ b/compiler/rustc_query_impl/src/keys.rs @@ -294,6 +294,16 @@ impl<'tcx> Key for ty::PolyTraitRef<'tcx> { } } +impl<'tcx> Key for ty::PolyExistentialTraitRef<'tcx> { + #[inline(always)] + fn query_crate_is_local(&self) -> bool { + self.def_id().krate == LOCAL_CRATE + } + fn default_span(&self, tcx: TyCtxt<'_>) -> Span { + tcx.def_span(self.def_id()) + } +} + impl<'tcx> Key for (ty::PolyTraitRef<'tcx>, ty::PolyTraitRef<'tcx>) { #[inline(always)] fn query_crate_is_local(&self) -> bool { -- cgit 1.4.1-3-g733a5