@@ -78,9 +78,9 @@ impl<T: Hash> Hash for Obligation<'_, T> {
78
78
}
79
79
}
80
80
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 > {
82
82
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 }
84
84
}
85
85
}
86
86
@@ -155,7 +155,7 @@ impl<'tcx, O> Obligation<'tcx, O> {
155
155
tcx : TyCtxt < ' tcx > ,
156
156
cause : ObligationCause < ' tcx > ,
157
157
param_env : ty:: ParamEnv < ' tcx > ,
158
- predicate : impl Upcast < ' tcx , O > ,
158
+ predicate : impl Upcast < TyCtxt < ' tcx > , O > ,
159
159
) -> Obligation < ' tcx , O > {
160
160
Self :: with_depth ( tcx, cause, 0 , param_env, predicate)
161
161
}
@@ -173,7 +173,7 @@ impl<'tcx, O> Obligation<'tcx, O> {
173
173
cause : ObligationCause < ' tcx > ,
174
174
recursion_depth : usize ,
175
175
param_env : ty:: ParamEnv < ' tcx > ,
176
- predicate : impl Upcast < ' tcx , O > ,
176
+ predicate : impl Upcast < TyCtxt < ' tcx > , O > ,
177
177
) -> Obligation < ' tcx , O > {
178
178
let predicate = predicate. upcast ( tcx) ;
179
179
Obligation { cause, param_env, recursion_depth, predicate }
@@ -184,12 +184,16 @@ impl<'tcx, O> Obligation<'tcx, O> {
184
184
span : Span ,
185
185
body_id : LocalDefId ,
186
186
param_env : ty:: ParamEnv < ' tcx > ,
187
- trait_ref : impl Upcast < ' tcx , O > ,
187
+ trait_ref : impl Upcast < TyCtxt < ' tcx > , O > ,
188
188
) -> Obligation < ' tcx , O > {
189
189
Obligation :: new ( tcx, ObligationCause :: misc ( span, body_id) , param_env, trait_ref)
190
190
}
191
191
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 > {
193
197
Obligation :: with_depth ( tcx, self . cause . clone ( ) , self . recursion_depth , self . param_env , value)
194
198
}
195
199
}
0 commit comments