@@ -78,9 +78,9 @@ impl<T: Hash> Hash for Obligation<'_, T> {
7878 }
7979}
8080
81- impl < ' tcx , P > From < Obligation < ' tcx , P > > for solve :: Goal < ' tcx , P > {
81+ impl < ' tcx , P > From < Obligation < ' tcx , P > > for ty :: Goal < ' tcx , P > {
8282 fn from ( value : Obligation < ' tcx , P > ) -> Self {
83- solve :: Goal { param_env : value. param_env , predicate : value. predicate }
83+ ty :: Goal { param_env : value. param_env , predicate : value. predicate }
8484 }
8585}
8686
@@ -155,7 +155,7 @@ impl<'tcx, O> Obligation<'tcx, O> {
155155 tcx : TyCtxt < ' tcx > ,
156156 cause : ObligationCause < ' tcx > ,
157157 param_env : ty:: ParamEnv < ' tcx > ,
158- predicate : impl Upcast < ' tcx , O > ,
158+ predicate : impl Upcast < TyCtxt < ' tcx > , O > ,
159159 ) -> Obligation < ' tcx , O > {
160160 Self :: with_depth ( tcx, cause, 0 , param_env, predicate)
161161 }
@@ -173,7 +173,7 @@ impl<'tcx, O> Obligation<'tcx, O> {
173173 cause : ObligationCause < ' tcx > ,
174174 recursion_depth : usize ,
175175 param_env : ty:: ParamEnv < ' tcx > ,
176- predicate : impl Upcast < ' tcx , O > ,
176+ predicate : impl Upcast < TyCtxt < ' tcx > , O > ,
177177 ) -> Obligation < ' tcx , O > {
178178 let predicate = predicate. upcast ( tcx) ;
179179 Obligation { cause, param_env, recursion_depth, predicate }
@@ -184,12 +184,16 @@ impl<'tcx, O> Obligation<'tcx, O> {
184184 span : Span ,
185185 body_id : LocalDefId ,
186186 param_env : ty:: ParamEnv < ' tcx > ,
187- trait_ref : impl Upcast < ' tcx , O > ,
187+ trait_ref : impl Upcast < TyCtxt < ' tcx > , O > ,
188188 ) -> Obligation < ' tcx , O > {
189189 Obligation :: new ( tcx, ObligationCause :: misc ( span, body_id) , param_env, trait_ref)
190190 }
191191
192- pub fn with < P > ( & self , tcx : TyCtxt < ' tcx > , value : impl Upcast < ' tcx , P > ) -> Obligation < ' tcx , P > {
192+ pub fn with < P > (
193+ & self ,
194+ tcx : TyCtxt < ' tcx > ,
195+ value : impl Upcast < TyCtxt < ' tcx > , P > ,
196+ ) -> Obligation < ' tcx , P > {
193197 Obligation :: with_depth ( tcx, self . cause . clone ( ) , self . recursion_depth , self . param_env , value)
194198 }
195199}
0 commit comments