@@ -551,7 +551,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
551551 polonius_output : Option < Rc < PoloniusOutput > > ,
552552 ) -> ( Option < ClosureRegionRequirements < ' tcx > > , RegionErrors < ' tcx > ) {
553553 let mir_def_id = body. source . def_id ( ) ;
554- self . propagate_constraints ( body, infcx . tcx ) ;
554+ self . propagate_constraints ( body) ;
555555
556556 let mut errors_buffer = RegionErrors :: new ( ) ;
557557
@@ -599,7 +599,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
599599 /// for each region variable until all the constraints are
600600 /// satisfied. Note that some values may grow **too** large to be
601601 /// feasible, but we check this later.
602- fn propagate_constraints ( & mut self , _body : & Body < ' tcx > , tcx : TyCtxt < ' tcx > ) {
602+ fn propagate_constraints ( & mut self , _body : & Body < ' tcx > ) {
603603 debug ! ( "propagate_constraints()" ) ;
604604
605605 debug ! ( "propagate_constraints: constraints={:#?}" , {
@@ -617,7 +617,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
617617 // own.
618618 let constraint_sccs = self . constraint_sccs . clone ( ) ;
619619 for scc in constraint_sccs. all_sccs ( ) {
620- self . compute_value_for_scc ( scc, tcx ) ;
620+ self . compute_value_for_scc ( scc) ;
621621 }
622622
623623 // Sort the applied member constraints so we can binary search
@@ -629,7 +629,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
629629 /// computed, by unioning the values of its successors.
630630 /// Assumes that all successors have been computed already
631631 /// (which is assured by iterating over SCCs in dependency order).
632- fn compute_value_for_scc ( & mut self , scc_a : ConstraintSccIndex , tcx : TyCtxt < ' tcx > ) {
632+ fn compute_value_for_scc ( & mut self , scc_a : ConstraintSccIndex ) {
633633 let constraint_sccs = self . constraint_sccs . clone ( ) ;
634634
635635 // Walk each SCC `B` such that `A: B`...
@@ -652,12 +652,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
652652 // Now take member constraints into account.
653653 let member_constraints = self . member_constraints . clone ( ) ;
654654 for m_c_i in member_constraints. indices ( scc_a) {
655- self . apply_member_constraint (
656- tcx,
657- scc_a,
658- m_c_i,
659- member_constraints. choice_regions ( m_c_i) ,
660- ) ;
655+ self . apply_member_constraint ( scc_a, m_c_i, member_constraints. choice_regions ( m_c_i) ) ;
661656 }
662657
663658 debug ! (
@@ -680,31 +675,12 @@ impl<'tcx> RegionInferenceContext<'tcx> {
680675 /// If we make any changes, returns true, else false.
681676 fn apply_member_constraint (
682677 & mut self ,
683- tcx : TyCtxt < ' tcx > ,
684678 scc : ConstraintSccIndex ,
685679 member_constraint_index : NllMemberConstraintIndex ,
686680 choice_regions : & [ ty:: RegionVid ] ,
687681 ) -> bool {
688682 debug ! ( "apply_member_constraint(scc={:?}, choice_regions={:#?})" , scc, choice_regions, ) ;
689683
690- if let Some ( uh_oh) =
691- choice_regions. iter ( ) . find ( |& & r| !self . universal_regions . is_universal_region ( r) )
692- {
693- // FIXME(#61773): This case can only occur with
694- // `impl_trait_in_bindings`, I believe, and we are just
695- // opting not to handle it for now. See #61773 for
696- // details.
697- tcx. sess . delay_span_bug (
698- self . member_constraints [ member_constraint_index] . definition_span ,
699- & format ! (
700- "member constraint for `{:?}` has an option region `{:?}` \
701- that is not a universal region",
702- self . member_constraints[ member_constraint_index] . opaque_type_def_id, uh_oh,
703- ) ,
704- ) ;
705- return false ;
706- }
707-
708684 // Create a mutable vector of the options. We'll try to winnow
709685 // them down.
710686 let mut choice_regions: Vec < ty:: RegionVid > = choice_regions. to_vec ( ) ;
0 commit comments