diff options
| author | bishtpawan <pawan.bisht@knoldus.com> | 2020-10-20 23:13:21 +0530 |
|---|---|---|
| committer | bishtpawan <pawan.bisht@knoldus.com> | 2020-10-20 23:13:21 +0530 |
| commit | fa094044a98dade4ac2dffe1f1e4383b34bb03ff (patch) | |
| tree | cccd95f1514e223007fe12f07a8d32d228a8184a /compiler | |
| parent | cb2462c53f2cc3f140c0f1ea0976261cab968a34 (diff) | |
| download | rust-fa094044a98dade4ac2dffe1f1e4383b34bb03ff.tar.gz rust-fa094044a98dade4ac2dffe1f1e4383b34bb03ff.zip | |
Fix build failure of rustfmt
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_mir_build/src/lints.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_mir_build/src/lints.rs b/compiler/rustc_mir_build/src/lints.rs index bdef02a011b..b588bc1ad83 100644 --- a/compiler/rustc_mir_build/src/lints.rs +++ b/compiler/rustc_mir_build/src/lints.rs @@ -71,11 +71,12 @@ impl<'mir, 'tcx> Search<'mir, 'tcx> { let func_ty = func.ty(body, tcx); if let ty::FnDef(callee, substs) = *func_ty.kind() { + 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, substs) { + if let Ok(Some(instance)) = Instance::resolve(tcx, param_env, callee, normalized_substs) { (instance.def_id(), instance.substs) } else { - (callee, substs) + (callee, normalized_substs) }; // FIXME(#57965): Make this work across function boundaries |
