Skip to content

Commit dde49f3

Browse files
authored
Merge pull request #3002 from rust-lang-nursery/rustup
Rustup to 59fa6bd
2 parents 8ef759e + 0ff762f commit dde49f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clippy_lints/src/consts.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
426426
}
427427

428428
pub fn miri_to_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, result: &ty::Const<'tcx>) -> Option<Constant> {
429-
use rustc::mir::interpret::{Scalar, ConstValue};
429+
use rustc::mir::interpret::{Scalar, ScalarMaybeUndef, ConstValue};
430430
match result.val {
431431
ConstValue::Scalar(Scalar::Bits{ bits: b, ..}) => match result.ty.sty {
432432
ty::TyBool => Some(Constant::Bool(b == 1)),
@@ -436,7 +436,9 @@ pub fn miri_to_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, result: &ty::Const<'
436436
// FIXME: implement other conversion
437437
_ => None,
438438
},
439-
ConstValue::ScalarPair(Scalar::Ptr(ptr), Scalar::Bits { bits: n, .. }) => match result.ty.sty {
439+
ConstValue::ScalarPair(Scalar::Ptr(ptr),
440+
ScalarMaybeUndef::Scalar(
441+
Scalar::Bits { bits: n, .. })) => match result.ty.sty {
440442
ty::TyRef(_, tam, _) => match tam.sty {
441443
ty::TyStr => {
442444
let alloc = tcx

0 commit comments

Comments
 (0)