@@ -317,14 +317,13 @@ fn negative_impl<'cx, 'tcx>(
317317 let ( subject2, obligations) =
318318 impl_subject_and_oblig ( selcx, impl_env, impl2_def_id, impl2_substs) ;
319319
320- !equate ( & infcx, impl_env, impl1_def_id , subject1, subject2, obligations)
320+ !equate ( & infcx, impl_env, subject1, subject2, obligations)
321321 } )
322322}
323323
324324fn equate < ' cx , ' tcx > (
325325 infcx : & InferCtxt < ' cx , ' tcx > ,
326326 impl_env : ty:: ParamEnv < ' tcx > ,
327- impl1_def_id : DefId ,
328327 subject1 : ImplSubject < ' tcx > ,
329328 subject2 : ImplSubject < ' tcx > ,
330329 obligations : impl Iterator < Item = PredicateObligation < ' tcx > > ,
@@ -341,7 +340,7 @@ fn equate<'cx, 'tcx>(
341340 let opt_failing_obligation = obligations
342341 . into_iter ( )
343342 . 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) ) ;
345344
346345 if let Some ( failing_obligation) = opt_failing_obligation {
347346 debug ! ( "overlap: obligation unsatisfiable {:?}" , failing_obligation) ;
@@ -356,18 +355,17 @@ fn equate<'cx, 'tcx>(
356355fn negative_impl_exists < ' cx , ' tcx > (
357356 selcx : & SelectionContext < ' cx , ' tcx > ,
358357 param_env : ty:: ParamEnv < ' tcx > ,
359- region_context : DefId ,
360358 o : & PredicateObligation < ' tcx > ,
361359) -> bool {
362360 let infcx = & selcx. infcx ( ) . fork ( ) ;
363361
364- if resolve_negative_obligation ( infcx, param_env, region_context , o) {
362+ if resolve_negative_obligation ( infcx, param_env, o) {
365363 return true ;
366364 }
367365
368366 // Try to prove a negative obligation exists for super predicates
369367 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) {
371369 return true ;
372370 }
373371 }
@@ -379,7 +377,6 @@ fn negative_impl_exists<'cx, 'tcx>(
379377fn resolve_negative_obligation < ' cx , ' tcx > (
380378 infcx : & InferCtxt < ' cx , ' tcx > ,
381379 param_env : ty:: ParamEnv < ' tcx > ,
382- region_context : DefId ,
383380 o : & PredicateObligation < ' tcx > ,
384381) -> bool {
385382 let tcx = infcx. tcx ;
@@ -409,7 +406,7 @@ fn resolve_negative_obligation<'cx, 'tcx>(
409406
410407 infcx. process_registered_region_obligations ( outlives_env. region_bound_pairs_map ( ) , param_env) ;
411408
412- let errors = infcx. resolve_regions ( region_context , & outlives_env) ;
409+ let errors = infcx. resolve_regions ( & outlives_env) ;
413410
414411 if !errors. is_empty ( ) {
415412 return false ;
0 commit comments