implement valtrees as the type-system representation for constant values
This commit is contained in:
parent
edab34ab2a
commit
705d818bd5
116 changed files with 1606 additions and 1032 deletions
|
@ -637,7 +637,11 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
ty::ConstKind::Infer(..) | ty::ConstKind::Placeholder(..) => {
|
||||
span_bug!(self.cur_span(), "const_to_op: Unexpected ConstKind {:?}", c)
|
||||
}
|
||||
ty::ConstKind::Value(val) => self.const_val_to_op(val, c.ty(), layout),
|
||||
ty::ConstKind::Value(valtree) => {
|
||||
let ty = val.ty();
|
||||
let const_val = self.tcx.valtree_to_const_val((ty, valtree));
|
||||
self.const_val_to_op(const_val, ty, layout)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue