1
Fork 0

interpret: err instead of ICE on size mismatches in to_bits_or_ptr_internal

This commit is contained in:
Ralf Jung 2022-04-07 16:22:09 -04:00
parent b6ab1fae73
commit 38004b72bc
16 changed files with 107 additions and 67 deletions

View file

@ -519,7 +519,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
.kind(),
ty::Dynamic(..)
));
let vtable = self.scalar_to_ptr(receiver_place.meta.unwrap_meta());
let vtable = self.scalar_to_ptr(receiver_place.meta.unwrap_meta())?;
let fn_val = self.get_vtable_slot(vtable, u64::try_from(idx).unwrap())?;
// `*mut receiver_place.layout.ty` is almost the layout that we