Skip to content

Commit 4062418

Browse files
committed
Deal with fallout
1 parent 4aa4fec commit 4062418

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_utils/src/consts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ pub fn miri_to_const<'tcx>(lcx: &LateContext<'tcx>, result: mir::ConstantKind<'t
689689
mir::ConstantKind::Val(ConstValue::ByRef { alloc, offset: _ }, _) => match result.ty().kind() {
690690
ty::Adt(adt_def, _) if adt_def.is_struct() => Some(Constant::Adt(result)),
691691
ty::Array(sub_type, len) => match sub_type.kind() {
692-
ty::Float(FloatTy::F32) => match len.kind().try_to_target_usize(lcx.tcx) {
692+
ty::Float(FloatTy::F32) => match len.try_to_target_usize(lcx.tcx) {
693693
Some(len) => alloc
694694
.inner()
695695
.inspect_with_uninit_and_ptr_outside_interpreter(0..(4 * usize::try_from(len).unwrap()))
@@ -700,7 +700,7 @@ pub fn miri_to_const<'tcx>(lcx: &LateContext<'tcx>, result: mir::ConstantKind<'t
700700
.map(Constant::Vec),
701701
_ => None,
702702
},
703-
ty::Float(FloatTy::F64) => match len.kind().try_to_target_usize(lcx.tcx) {
703+
ty::Float(FloatTy::F64) => match len.try_to_target_usize(lcx.tcx) {
704704
Some(len) => alloc
705705
.inner()
706706
.inspect_with_uninit_and_ptr_outside_interpreter(0..(8 * usize::try_from(len).unwrap()))

0 commit comments

Comments
 (0)