@@ -317,14 +317,13 @@ fn negative_impl<'cx, 'tcx>(
317
317
let ( subject2, obligations) =
318
318
impl_subject_and_oblig ( selcx, impl_env, impl2_def_id, impl2_substs) ;
319
319
320
- !equate ( & infcx, impl_env, impl1_def_id , subject1, subject2, obligations)
320
+ !equate ( & infcx, impl_env, subject1, subject2, obligations)
321
321
} )
322
322
}
323
323
324
324
fn equate < ' cx , ' tcx > (
325
325
infcx : & InferCtxt < ' cx , ' tcx > ,
326
326
impl_env : ty:: ParamEnv < ' tcx > ,
327
- impl1_def_id : DefId ,
328
327
subject1 : ImplSubject < ' tcx > ,
329
328
subject2 : ImplSubject < ' tcx > ,
330
329
obligations : impl Iterator < Item = PredicateObligation < ' tcx > > ,
@@ -341,7 +340,7 @@ fn equate<'cx, 'tcx>(
341
340
let opt_failing_obligation = obligations
342
341
. into_iter ( )
343
342
. chain ( more_obligations)
344
- . find ( |o| negative_impl_exists ( selcx, impl_env, impl1_def_id , o) ) ;
343
+ . find ( |o| negative_impl_exists ( selcx, impl_env, o) ) ;
345
344
346
345
if let Some ( failing_obligation) = opt_failing_obligation {
347
346
debug ! ( "overlap: obligation unsatisfiable {:?}" , failing_obligation) ;
@@ -356,18 +355,17 @@ fn equate<'cx, 'tcx>(
356
355
fn negative_impl_exists < ' cx , ' tcx > (
357
356
selcx : & SelectionContext < ' cx , ' tcx > ,
358
357
param_env : ty:: ParamEnv < ' tcx > ,
359
- region_context : DefId ,
360
358
o : & PredicateObligation < ' tcx > ,
361
359
) -> bool {
362
360
let infcx = & selcx. infcx ( ) . fork ( ) ;
363
361
364
- if resolve_negative_obligation ( infcx, param_env, region_context , o) {
362
+ if resolve_negative_obligation ( infcx, param_env, o) {
365
363
return true ;
366
364
}
367
365
368
366
// Try to prove a negative obligation exists for super predicates
369
367
for o in util:: elaborate_predicates ( infcx. tcx , iter:: once ( o. predicate ) ) {
370
- if resolve_negative_obligation ( infcx, param_env, region_context , & o) {
368
+ if resolve_negative_obligation ( infcx, param_env, & o) {
371
369
return true ;
372
370
}
373
371
}
@@ -379,7 +377,6 @@ fn negative_impl_exists<'cx, 'tcx>(
379
377
fn resolve_negative_obligation < ' cx , ' tcx > (
380
378
infcx : & InferCtxt < ' cx , ' tcx > ,
381
379
param_env : ty:: ParamEnv < ' tcx > ,
382
- region_context : DefId ,
383
380
o : & PredicateObligation < ' tcx > ,
384
381
) -> bool {
385
382
let tcx = infcx. tcx ;
@@ -409,7 +406,7 @@ fn resolve_negative_obligation<'cx, 'tcx>(
409
406
410
407
infcx. process_registered_region_obligations ( outlives_env. region_bound_pairs_map ( ) , param_env) ;
411
408
412
- let errors = infcx. resolve_regions ( region_context , & outlives_env) ;
409
+ let errors = infcx. resolve_regions ( & outlives_env) ;
413
410
414
411
if !errors. is_empty ( ) {
415
412
return false ;
0 commit comments