@@ -327,11 +327,10 @@ fn equate<'tcx>(
327
327
return true ;
328
328
} ;
329
329
330
- let selcx = & mut SelectionContext :: new ( & infcx) ;
331
330
let opt_failing_obligation = obligations
332
331
. into_iter ( )
333
332
. chain ( more_obligations)
334
- . find ( |o| negative_impl_exists ( selcx , o, body_def_id) ) ;
333
+ . find ( |o| negative_impl_exists ( infcx , o, body_def_id) ) ;
335
334
336
335
if let Some ( failing_obligation) = opt_failing_obligation {
337
336
debug ! ( "overlap: obligation unsatisfiable {:?}" , failing_obligation) ;
@@ -342,19 +341,19 @@ fn equate<'tcx>(
342
341
}
343
342
344
343
/// Try to prove that a negative impl exist for the given obligation and its super predicates.
345
- #[ instrument( level = "debug" , skip( selcx ) ) ]
346
- fn negative_impl_exists < ' cx , ' tcx > (
347
- selcx : & SelectionContext < ' cx , ' tcx > ,
344
+ #[ instrument( level = "debug" , skip( infcx ) ) ]
345
+ fn negative_impl_exists < ' tcx > (
346
+ infcx : & InferCtxt < ' tcx > ,
348
347
o : & PredicateObligation < ' tcx > ,
349
348
body_def_id : DefId ,
350
349
) -> bool {
351
- if resolve_negative_obligation ( selcx . infcx ( ) . fork ( ) , o, body_def_id) {
350
+ if resolve_negative_obligation ( infcx. fork ( ) , o, body_def_id) {
352
351
return true ;
353
352
}
354
353
355
354
// Try to prove a negative obligation exists for super predicates
356
- for o in util:: elaborate_predicates ( selcx . tcx ( ) , iter:: once ( o. predicate ) ) {
357
- if resolve_negative_obligation ( selcx . infcx ( ) . fork ( ) , & o, body_def_id) {
355
+ for o in util:: elaborate_predicates ( infcx . tcx , iter:: once ( o. predicate ) ) {
356
+ if resolve_negative_obligation ( infcx. fork ( ) , & o, body_def_id) {
358
357
return true ;
359
358
}
360
359
}
0 commit comments