1
Fork 0

now we can make scalar_to_ptr a method on Scalar

This commit is contained in:
Ralf Jung 2022-07-23 10:36:57 -04:00
parent 665a7e8f56
commit 4e89a7c293
10 changed files with 41 additions and 45 deletions

View file

@ -561,7 +561,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
};
// Get the required information from the vtable.
let vptr = self.scalar_to_ptr(receiver_place.meta.unwrap_meta())?;
let vptr = receiver_place.meta.unwrap_meta().to_pointer(self)?;
let (dyn_ty, dyn_trait) = self.get_ptr_vtable(vptr)?;
if dyn_trait != data.principal() {
throw_ub_format!(