s/Scalar::Raw/Scalar::Int

This commit is contained in:
oli 2020-11-01 16:57:03 +00:00
parent 6fdbde5f46
commit 83edb2f4e4
1 changed files with 1 additions and 1 deletions

View File

@ -503,7 +503,7 @@ impl<'a, 'tcx> ConstEvalLateContext<'a, 'tcx> {
pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> {
use rustc_middle::mir::interpret::{ConstValue};
match result.val {
ty::ConstKind::Value(ConstValue::Scalar(Scalar::Raw(int))) => {
ty::ConstKind::Value(ConstValue::Scalar(Scalar::Int(int))) => {
match result.ty.kind() {
ty::Bool => Some(Constant::Bool(int == ScalarInt::TRUE)),
ty::Uint(_) | ty::Int(_) => Some(Constant::Int(int.assert_bits(int.size()))),