Fold vtable_trait_upcasting_coercion_new_vptr_slot logic into obligation processing.

This commit is contained in:
Charles Lew 2021-08-18 12:45:18 +08:00
parent 1e605023ec
commit 6b1c52ff25
11 changed files with 137 additions and 87 deletions

View file

@ -987,9 +987,9 @@ rustc_queries! {
desc { |tcx| "finding all vtable entries for trait {}", tcx.def_path_str(key.def_id()) }
}
query vtable_trait_upcasting_coercion_new_vptr_slot(key: (ty::PolyTraitRef<'tcx>, ty::PolyTraitRef<'tcx>)) -> Option<usize> {
desc { |tcx| "finding the slot within vtable for trait {} vtable ptr during trait upcasting coercion from {} vtable",
tcx.def_path_str(key.1.def_id()), tcx.def_path_str(key.0.def_id()) }
query vtable_trait_upcasting_coercion_new_vptr_slot(key: (ty::Ty<'tcx>, ty::Ty<'tcx>)) -> Option<usize> {
desc { |tcx| "finding the slot within vtable for trait object {} vtable ptr during trait upcasting coercion from {} vtable",
key.1, key.0 }
}
query codegen_fulfill_obligation(