Skip to content

Commit be1094b

Browse files
committed
ScalarMaybeUndef -> Scalar (Rustup to e812ca4)
1 parent fca8053 commit be1094b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clippy_lints/src/consts.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
409409
}
410410

411411
pub fn miri_to_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, result: &ty::Const<'tcx>) -> Option<Constant> {
412-
use crate::rustc::mir::interpret::{Scalar, ScalarMaybeUndef, ConstValue};
412+
use crate::rustc::mir::interpret::{Scalar, ConstValue};
413413
match result.val {
414414
ConstValue::Scalar(Scalar::Bits{ bits: b, ..}) => match result.ty.sty {
415415
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<'
420420
_ => None,
421421
},
422422
ConstValue::ScalarPair(Scalar::Ptr(ptr),
423-
ScalarMaybeUndef::Scalar(
424-
Scalar::Bits { bits: n, .. })) => match result.ty.sty {
423+
Scalar::Bits { bits: n, .. }) => match result.ty.sty {
425424
ty::Ref(_, tam, _) => match tam.sty {
426425
ty::Str => {
427426
let alloc = tcx

0 commit comments

Comments
 (0)