Specialize DestructuredConstant
to its one user (pretty printing)
This commit is contained in:
parent
4dcf988360
commit
a0eb348d38
3 changed files with 13 additions and 8 deletions
|
@ -115,7 +115,7 @@ pub(crate) fn try_destructure_mir_constant<'tcx>(
|
|||
.map(|i| {
|
||||
let field_op = ecx.operand_field(&down, i)?;
|
||||
let val = op_to_const(&ecx, &field_op);
|
||||
Ok(mir::ConstantKind::Val(val, field_op.layout.ty))
|
||||
Ok((val, field_op.layout.ty))
|
||||
})
|
||||
.collect::<InterpResult<'tcx, Vec<_>>>()?;
|
||||
let fields = tcx.arena.alloc_from_iter(fields_iter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue