1
Fork 0

Refactor vtable format.

This commit is contained in:
Charles Lew 2021-06-17 12:20:18 +08:00
parent da7d405357
commit d2dc4276fd
5 changed files with 311 additions and 58 deletions

View file

@ -1116,6 +1116,10 @@ fn create_mono_items_for_vtable_methods<'tcx>(
| VtblEntry::MetadataSize
| VtblEntry::MetadataAlign
| VtblEntry::Vacant => None,
VtblEntry::TraitVPtr(_) => {
// all super trait items already covered, so skip them.
None
}
VtblEntry::Method(def_id, substs) => ty::Instance::resolve_for_vtable(
tcx,
ty::ParamEnv::reveal_all(),