Skip to content

Commit fd041d5

Browse files
committed
Auto merge of #113370 - compiler-errors:rollup-8gvyy8e, r=compiler-errors
Rollup of 8 pull requests Successful merges: - #113010 (rust-installer & rls: remove exclusion from rustfmt & tidy ) - #113317 ( -Ztrait-solver=next: stop depending on old solver) - #113319 (`TypeParameterDefinition` always require a `DefId`) - #113320 (Add some extra information to opaque type cycle errors) - #113321 (Move `ty::ConstKind` to `rustc_type_ir`) - #113337 (Winnow specialized impls during selection in new solver) - #113355 (Move most coverage code out of `rustc_codegen_ssa`) - #113356 (Add support for NetBSD/riscv64 aka. riscv64gc-unknown-netbsd.) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 6c1e3eb + ac143c4 commit fd041d5

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)