Skip to content

Commit b4f1769

Browse files
committed
Auto merge of #4815 - JohnTitor:rustup, r=matthiaskrgr
Rustup rust-lang/rust#66233 changelog: none
2 parents 0574d66 + 0736dd9 commit b4f1769

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/consts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
474474
pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> {
475475
use rustc::mir::interpret::{ConstValue, Scalar};
476476
match result.val {
477-
ConstValue::Scalar(Scalar::Raw { data: d, .. }) => match result.ty.kind {
477+
ty::ConstKind::Value(ConstValue::Scalar(Scalar::Raw { data: d, .. })) => match result.ty.kind {
478478
ty::Bool => Some(Constant::Bool(d == 1)),
479479
ty::Uint(_) | ty::Int(_) => Some(Constant::Int(d)),
480480
ty::Float(FloatTy::F32) => Some(Constant::F32(f32::from_bits(
@@ -492,7 +492,7 @@ pub fn miri_to_const(result: &ty::Const<'_>) -> Option<Constant> {
492492
// FIXME: implement other conversions.
493493
_ => None,
494494
},
495-
ConstValue::Slice { data, start, end } => match result.ty.kind {
495+
ty::ConstKind::Value(ConstValue::Slice { data, start, end }) => match result.ty.kind {
496496
ty::Ref(_, tam, _) => match tam.kind {
497497
ty::Str => String::from_utf8(
498498
data.inspect_with_undef_and_ptr_outside_interpreter(start..end)

0 commit comments

Comments
 (0)