From be1094bd8db7ed662206601c6917a8ee0d965803 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Tue, 2 Oct 2018 10:35:26 +0200 Subject: [PATCH] ScalarMaybeUndef -> Scalar (Rustup to e812ca472a2a5284e9f15cd9af32285d7ff3fd39) --- clippy_lints/src/consts.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/consts.rs b/clippy_lints/src/consts.rs index 0690d6934e5..4e09e039100 100644 --- a/clippy_lints/src/consts.rs +++ b/clippy_lints/src/consts.rs @@ -409,7 +409,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> { } pub fn miri_to_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, result: &ty::Const<'tcx>) -> Option { - use crate::rustc::mir::interpret::{Scalar, ScalarMaybeUndef, ConstValue}; + use crate::rustc::mir::interpret::{Scalar, ConstValue}; match result.val { ConstValue::Scalar(Scalar::Bits{ bits: b, ..}) => match result.ty.sty { ty::Bool => Some(Constant::Bool(b == 1)), @@ -420,8 +420,7 @@ pub fn miri_to_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, result: &ty::Const<' _ => None, }, ConstValue::ScalarPair(Scalar::Ptr(ptr), - ScalarMaybeUndef::Scalar( - Scalar::Bits { bits: n, .. })) => match result.ty.sty { + Scalar::Bits { bits: n, .. }) => match result.ty.sty { ty::Ref(_, tam, _) => match tam.sty { ty::Str => { let alloc = tcx