use EarlyBinder in tcx.(try_)subst_mir_and_normalize_erasing_regions
This commit is contained in:
parent
e5d10cdbc3
commit
82f57c16b7
7 changed files with 20 additions and 12 deletions
|
@ -180,7 +180,7 @@ impl<'tcx> Inliner<'tcx> {
|
|||
let Ok(callee_body) = callsite.callee.try_subst_mir_and_normalize_erasing_regions(
|
||||
self.tcx,
|
||||
self.param_env,
|
||||
callee_body.clone(),
|
||||
ty::EarlyBinder(callee_body.clone()),
|
||||
) else {
|
||||
return Err("failed to normalize callee body");
|
||||
};
|
||||
|
|
|
@ -44,7 +44,11 @@ pub(crate) fn mir_callgraph_reachable<'tcx>(
|
|||
) -> bool {
|
||||
trace!(%caller);
|
||||
for &(callee, substs) in tcx.mir_inliner_callees(caller.def) {
|
||||
let Ok(substs) = caller.try_subst_mir_and_normalize_erasing_regions(tcx, param_env, substs) else {
|
||||
let Ok(substs) = caller.try_subst_mir_and_normalize_erasing_regions(
|
||||
tcx,
|
||||
param_env,
|
||||
ty::EarlyBinder(substs),
|
||||
) else {
|
||||
trace!(?caller, ?param_env, ?substs, "cannot normalize, skipping");
|
||||
continue;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue