diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-06-28 09:34:26 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-07-05 15:54:43 +0000 |
| commit | a0eb348d3828a6332a8372536a008bfbf7585c03 (patch) | |
| tree | 5d365aaef77e7bb4ce6585aaa6d615f9df756e9b /compiler/rustc_const_eval | |
| parent | 4dcf988360b52610582deedbb7b6e3f84d5e7dae (diff) | |
| download | rust-a0eb348d3828a6332a8372536a008bfbf7585c03.tar.gz rust-a0eb348d3828a6332a8372536a008bfbf7585c03.zip | |
Specialize `DestructuredConstant` to its one user (pretty printing)
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/mod.rs b/compiler/rustc_const_eval/src/const_eval/mod.rs index 900adb559bd..f23cb905c23 100644 --- a/compiler/rustc_const_eval/src/const_eval/mod.rs +++ b/compiler/rustc_const_eval/src/const_eval/mod.rs @@ -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); |
