@@ -162,8 +162,8 @@ fn overlap_within_probe<'cx, 'tcx>(
162
162
let infcx = selcx. infcx ( ) ;
163
163
164
164
if overlap_mode. use_negative_impl ( ) {
165
- if negative_impl ( selcx , impl1_def_id, impl2_def_id)
166
- || negative_impl ( selcx , impl2_def_id, impl1_def_id)
165
+ if negative_impl ( infcx . tcx , impl1_def_id, impl2_def_id)
166
+ || negative_impl ( infcx . tcx , impl2_def_id, impl1_def_id)
167
167
{
168
168
return None ;
169
169
}
@@ -279,13 +279,8 @@ fn implicit_negative<'cx, 'tcx>(
279
279
280
280
/// Given impl1 and impl2 check if both impls are never satisfied by a common type (including
281
281
/// where-clauses) If so, return true, they are disjoint and false otherwise.
282
- fn negative_impl < ' cx , ' tcx > (
283
- selcx : & mut SelectionContext < ' cx , ' tcx > ,
284
- impl1_def_id : DefId ,
285
- impl2_def_id : DefId ,
286
- ) -> bool {
282
+ fn negative_impl < ' tcx > ( tcx : TyCtxt < ' tcx > , impl1_def_id : DefId , impl2_def_id : DefId ) -> bool {
287
283
debug ! ( "negative_impl(impl1_def_id={:?}, impl2_def_id={:?})" , impl1_def_id, impl2_def_id) ;
288
- let tcx = selcx. infcx ( ) . tcx ;
289
284
290
285
// Create an infcx, taking the predicates of impl1 as assumptions:
291
286
let infcx = tcx. infer_ctxt ( ) . build ( ) ;
0 commit comments