@@ -115,7 +115,7 @@ impl<'tcx> Instance<'tcx> {
115115 /// lifetimes erased, allowing a `ParamEnv` to be specified for use during normalization.
116116 pub fn ty ( & self , tcx : TyCtxt < ' tcx > , param_env : ty:: ParamEnv < ' tcx > ) -> Ty < ' tcx > {
117117 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)
119119 }
120120
121121 /// Finds a crate that contains a monomorphization of this instance that
@@ -600,7 +600,7 @@ impl<'tcx> Instance<'tcx> {
600600 T : TypeFoldable < TyCtxt < ' tcx > > + Clone ,
601601 {
602602 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 ) )
604604 } else {
605605 tcx. normalize_erasing_regions ( param_env, v)
606606 }
@@ -617,7 +617,7 @@ impl<'tcx> Instance<'tcx> {
617617 T : TypeFoldable < TyCtxt < ' tcx > > + Clone ,
618618 {
619619 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 ) )
621621 } else {
622622 tcx. try_normalize_erasing_regions ( param_env, v)
623623 }
0 commit comments