1
Fork 0

Turn tcx.vtable_allocation() into a query.

This commit is contained in:
Michael Woerister 2021-10-07 11:29:01 +02:00 committed by Michael Woerister
parent a1e2c0f0ad
commit b7cc99142a
9 changed files with 101 additions and 72 deletions

View file

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