This commit is contained in:
b-naber 2022-06-14 17:34:37 +02:00
parent e14b34c386
commit 15c1c06522
10 changed files with 36 additions and 82 deletions

View file

@ -638,7 +638,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
span_bug!(self.cur_span(), "const_to_op: Unexpected ConstKind {:?}", c)
}
ty::ConstKind::Value(valtree) => {
let ty = val.ty();
let ty = c.ty();
let const_val = self.tcx.valtree_to_const_val((ty, valtree));
self.const_val_to_op(const_val, ty, layout)
}