Plumb dyn trait representation through ty::Dynamic
This commit is contained in:
parent
eff35e59c6
commit
6c01273a15
29 changed files with 110 additions and 57 deletions
|
@ -312,7 +312,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
let new_vptr = self.get_vtable_ptr(ty, data_b.principal())?;
|
||||
self.write_immediate(Immediate::new_dyn_trait(old_data, new_vptr, self), dest)
|
||||
}
|
||||
(_, &ty::Dynamic(ref data, _)) => {
|
||||
(_, &ty::Dynamic(ref data, _, _repr)) => {
|
||||
// Initial cast from sized to dyn trait
|
||||
let vtable = self.get_vtable_ptr(src_pointee_ty, data.principal())?;
|
||||
let ptr = self.read_scalar(src)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue