print normalized ty
This commit is contained in:
parent
4f75af9e19
commit
42c39b343d
@ -670,19 +670,24 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||||||
|
|
||||||
trace!("eval_place_to_op: got {:?}", op);
|
trace!("eval_place_to_op: got {:?}", op);
|
||||||
// Sanity-check the type we ended up with.
|
// Sanity-check the type we ended up with.
|
||||||
debug_assert!(
|
if cfg!(debug_assertions) {
|
||||||
mir_assign_valid_types(
|
let normalized_place_ty = self.subst_from_current_frame_and_normalize_erasing_regions(
|
||||||
|
mir_place.ty(&self.frame().body.local_decls, *self.tcx).ty,
|
||||||
|
)?;
|
||||||
|
if !mir_assign_valid_types(
|
||||||
*self.tcx,
|
*self.tcx,
|
||||||
self.param_env,
|
self.param_env,
|
||||||
self.layout_of(self.subst_from_current_frame_and_normalize_erasing_regions(
|
self.layout_of(normalized_place_ty)?,
|
||||||
mir_place.ty(&self.frame().body.local_decls, *self.tcx).ty
|
|
||||||
)?)?,
|
|
||||||
op.layout,
|
op.layout,
|
||||||
),
|
) {
|
||||||
"eval_place of a MIR place with type {:?} produced an interpreter operand with type {}",
|
span_bug!(
|
||||||
mir_place.ty(&self.frame().body.local_decls, *self.tcx).ty,
|
self.cur_span(),
|
||||||
op.layout.ty,
|
"eval_place of a MIR place with type {} produced an interpreter operand with type {}",
|
||||||
);
|
normalized_place_ty,
|
||||||
|
op.layout.ty,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
Ok(op)
|
Ok(op)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,19 +573,24 @@ where
|
|||||||
|
|
||||||
trace!("{:?}", self.dump_place(&place));
|
trace!("{:?}", self.dump_place(&place));
|
||||||
// Sanity-check the type we ended up with.
|
// Sanity-check the type we ended up with.
|
||||||
debug_assert!(
|
if cfg!(debug_assertions) {
|
||||||
mir_assign_valid_types(
|
let normalized_place_ty = self.subst_from_current_frame_and_normalize_erasing_regions(
|
||||||
|
mir_place.ty(&self.frame().body.local_decls, *self.tcx).ty,
|
||||||
|
)?;
|
||||||
|
if !mir_assign_valid_types(
|
||||||
*self.tcx,
|
*self.tcx,
|
||||||
self.param_env,
|
self.param_env,
|
||||||
self.layout_of(self.subst_from_current_frame_and_normalize_erasing_regions(
|
self.layout_of(normalized_place_ty)?,
|
||||||
mir_place.ty(&self.frame().body.local_decls, *self.tcx).ty
|
|
||||||
)?)?,
|
|
||||||
place.layout,
|
place.layout,
|
||||||
),
|
) {
|
||||||
"eval_place of a MIR place with type {:?} produced an interpreter place with type {}",
|
span_bug!(
|
||||||
mir_place.ty(&self.frame().body.local_decls, *self.tcx).ty,
|
self.cur_span(),
|
||||||
place.layout.ty,
|
"eval_place of a MIR place with type {} produced an interpreter place with type {}",
|
||||||
);
|
normalized_place_ty,
|
||||||
|
place.layout.ty,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
Ok(place)
|
Ok(place)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user