1
Fork 0

Add query own_existential_vtable_entries

This commit is contained in:
Gary Guo 2021-09-01 23:04:28 +01:00
parent 871eb6233e
commit 97214eecc5
4 changed files with 69 additions and 44 deletions

View file

@ -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 {