1
Fork 0

Add bound_fn_sig

This commit is contained in:
Jack Huey 2022-05-08 15:43:18 -04:00
parent c92248ab9f
commit 6c05e8d009
16 changed files with 59 additions and 36 deletions

View file

@ -2749,10 +2749,9 @@ impl<'tcx> ty::Instance<'tcx> {
// `src/test/ui/polymorphization/normalized_sig_types.rs`), and codegen not keeping
// track of a polymorphization `ParamEnv` to allow normalizing later.
let mut sig = match *ty.kind() {
ty::FnDef(def_id, substs) => EarlyBinder(
tcx.normalize_erasing_regions(tcx.param_env(def_id), tcx.fn_sig(def_id)),
)
.subst(tcx, substs),
ty::FnDef(def_id, substs) => tcx
.normalize_erasing_regions(tcx.param_env(def_id), tcx.bound_fn_sig(def_id))
.subst(tcx, substs),
_ => unreachable!(),
};