Skip to content

Commit

Permalink
Rollup merge of rust-lang#78156 - bishtpawan:bugfix/rustfmt-no-longer…
Browse files Browse the repository at this point in the history
…-builds, r=lcnr

Fixed build failure of `rustfmt`

Fixes rust-lang#78079
r? @eddyb cc @bjorn3
  • Loading branch information
JohnTitor committed Oct 22, 2020
2 parents 59ae795 + 7f58477 commit 513550c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions compiler/rustc_mir_build/src/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ impl<'mir, 'tcx> Search<'mir, 'tcx> {

let func_ty = func.ty(body, tcx);
if let ty::FnDef(callee, substs) = *func_ty.kind() {
let (callee, call_substs) =
if let Ok(Some(instance)) = Instance::resolve(tcx, param_env, callee, substs) {
(instance.def_id(), instance.substs)
} else {
(callee, substs)
};
let normalized_substs = tcx.normalize_erasing_regions(param_env, substs);
let (callee, call_substs) = if let Ok(Some(instance)) =
Instance::resolve(tcx, param_env, callee, normalized_substs)
{
(instance.def_id(), instance.substs)
} else {
(callee, normalized_substs)
};

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

Expand Down

0 comments on commit 513550c

Please sign in to comment.