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

@ -1012,6 +1012,13 @@ rustc_queries! {
key.1, key.0 }
}
query vtable_allocation(key: (Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>)) -> mir::interpret::AllocId {
desc { |tcx| "vtable const allocation for <{} as {}>",
key.0,
key.1.map(|trait_ref| format!("{}", trait_ref)).unwrap_or("_".to_owned())
}
}
query codegen_fulfill_obligation(
key: (ty::ParamEnv<'tcx>, ty::PolyTraitRef<'tcx>)
) -> Result<ImplSource<'tcx, ()>, ErrorReported> {