@@ -115,7 +115,7 @@ impl<'tcx> Instance<'tcx> {
115
115
/// lifetimes erased, allowing a `ParamEnv` to be specified for use during normalization.
116
116
pub fn ty ( & self , tcx : TyCtxt < ' tcx > , param_env : ty:: ParamEnv < ' tcx > ) -> Ty < ' tcx > {
117
117
let ty = tcx. type_of ( self . def . def_id ( ) ) ;
118
- tcx. subst_and_normalize_erasing_regions ( self . substs , param_env, ty. skip_binder ( ) )
118
+ tcx. subst_and_normalize_erasing_regions ( self . substs , param_env, ty)
119
119
}
120
120
121
121
/// Finds a crate that contains a monomorphization of this instance that
@@ -600,7 +600,7 @@ impl<'tcx> Instance<'tcx> {
600
600
T : TypeFoldable < TyCtxt < ' tcx > > + Clone ,
601
601
{
602
602
if let Some ( substs) = self . substs_for_mir_body ( ) {
603
- tcx. subst_and_normalize_erasing_regions ( substs, param_env, v )
603
+ tcx. subst_and_normalize_erasing_regions ( substs, param_env, ty :: EarlyBinder ( v ) )
604
604
} else {
605
605
tcx. normalize_erasing_regions ( param_env, v)
606
606
}
@@ -617,7 +617,7 @@ impl<'tcx> Instance<'tcx> {
617
617
T : TypeFoldable < TyCtxt < ' tcx > > + Clone ,
618
618
{
619
619
if let Some ( substs) = self . substs_for_mir_body ( ) {
620
- tcx. try_subst_and_normalize_erasing_regions ( substs, param_env, v )
620
+ tcx. try_subst_and_normalize_erasing_regions ( substs, param_env, ty :: EarlyBinder ( v ) )
621
621
} else {
622
622
tcx. try_normalize_erasing_regions ( param_env, v)
623
623
}
0 commit comments