1
Fork 0

Update other codegens to use tcx managed vtable allocations.

This commit is contained in:
Charles Lew 2021-06-20 17:43:25 +08:00
parent 654e3345e5
commit d3ff497bec
12 changed files with 144 additions and 250 deletions

View file

@ -31,9 +31,7 @@ pub(crate) fn unsized_info<'tcx>(
// change to the vtable.
old_info.expect("unsized_info: missing old info for trait upcast")
}
(_, &ty::Dynamic(ref data, ..)) => {
crate::vtable::get_vtable(fx, fx.layout_of(source), data.principal())
}
(_, &ty::Dynamic(ref data, ..)) => crate::vtable::get_vtable(fx, source, data.principal()),
_ => bug!("unsized_info: invalid unsizing {:?} -> {:?}", source, target),
}
}