Skip to content

Commit fa09404

Browse files
committed
Fix build failure of rustfmt
1 parent cb2462c commit fa09404

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/rustc_mir_build/src/lints.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,12 @@ impl<'mir, 'tcx> Search<'mir, 'tcx> {
7171

7272
let func_ty = func.ty(body, tcx);
7373
if let ty::FnDef(callee, substs) = *func_ty.kind() {
74+
let normalized_substs = tcx.normalize_erasing_regions(param_env, substs);
7475
let (callee, call_substs) =
75-
if let Ok(Some(instance)) = Instance::resolve(tcx, param_env, callee, substs) {
76+
if let Ok(Some(instance)) = Instance::resolve(tcx, param_env, callee, normalized_substs) {
7677
(instance.def_id(), instance.substs)
7778
} else {
78-
(callee, substs)
79+
(callee, normalized_substs)
7980
};
8081

8182
// FIXME(#57965): Make this work across function boundaries

0 commit comments

Comments
 (0)