diff options
| author | b-naber <bn263@gmx.de> | 2022-02-16 10:56:01 +0100 |
|---|---|---|
| committer | b-naber <bn263@gmx.de> | 2022-06-14 16:07:11 +0200 |
| commit | 705d818bd52a6324d5e7693cc4306457395eebc8 (patch) | |
| tree | f5363e1a8b0426bc961970028c23670869e344fb /compiler/rustc_middle/src/mir/terminator.rs | |
| parent | edab34ab2abbafc16a78daedf71dbacd2eb0b7bf (diff) | |
| download | rust-705d818bd52a6324d5e7693cc4306457395eebc8.tar.gz rust-705d818bd52a6324d5e7693cc4306457395eebc8.zip | |
implement valtrees as the type-system representation for constant values
Diffstat (limited to 'compiler/rustc_middle/src/mir/terminator.rs')
| -rw-r--r-- | compiler/rustc_middle/src/mir/terminator.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/terminator.rs b/compiler/rustc_middle/src/mir/terminator.rs index c859d93043e..c65e79a80fb 100644 --- a/compiler/rustc_middle/src/mir/terminator.rs +++ b/compiler/rustc_middle/src/mir/terminator.rs @@ -1,3 +1,4 @@ +use crate::mir; use crate::mir::interpret::Scalar; use crate::ty::{self, Ty, TyCtxt}; use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece}; @@ -676,7 +677,7 @@ impl<'tcx> TerminatorKind<'tcx> { .values .iter() .map(|&u| { - ty::Const::from_scalar(tcx, Scalar::from_uint(u, size), switch_ty) + mir::ConstantKind::from_scalar(tcx, Scalar::from_uint(u, size), switch_ty) .to_string() .into() }) |
