@@ -27,7 +27,7 @@ use crate::{
2727 } ,
2828 diagnostics:: { RegionErrorKind , RegionErrors , UniverseInfo } ,
2929 member_constraints:: { MemberConstraintSet , NllMemberConstraintIndex } ,
30- nll:: { PoloniusOutput , ToRegionVid } ,
30+ nll:: PoloniusOutput ,
3131 region_infer:: reverse_sccs:: ReverseSccGraph ,
3232 region_infer:: values:: {
3333 LivenessValues , PlaceholderIndices , RegionElement , RegionValueElements , RegionValues ,
@@ -593,39 +593,36 @@ impl<'tcx> RegionInferenceContext<'tcx> {
593593 /// Returns `true` if the region `r` contains the point `p`.
594594 ///
595595 /// Panics if called before `solve()` executes,
596- pub ( crate ) fn region_contains ( & self , r : impl ToRegionVid , p : impl ToElementIndex ) -> bool {
597- let scc = self . constraint_sccs . scc ( r. to_region_vid ( ) ) ;
596+ pub ( crate ) fn region_contains ( & self , r : RegionVid , p : impl ToElementIndex ) -> bool {
597+ let scc = self . constraint_sccs . scc ( r) ;
598598 self . scc_values . contains ( scc, p)
599599 }
600600
601601 /// Returns access to the value of `r` for debugging purposes.
602602 pub ( crate ) fn region_value_str ( & self , r : RegionVid ) -> String {
603- let scc = self . constraint_sccs . scc ( r. to_region_vid ( ) ) ;
603+ let scc = self . constraint_sccs . scc ( r) ;
604604 self . scc_values . region_value_str ( scc)
605605 }
606606
607607 pub ( crate ) fn placeholders_contained_in < ' a > (
608608 & ' a self ,
609609 r : RegionVid ,
610610 ) -> impl Iterator < Item = ty:: PlaceholderRegion > + ' a {
611- let scc = self . constraint_sccs . scc ( r. to_region_vid ( ) ) ;
611+ let scc = self . constraint_sccs . scc ( r) ;
612612 self . scc_values . placeholders_contained_in ( scc)
613613 }
614614
615615 /// Returns access to the value of `r` for debugging purposes.
616616 pub ( crate ) fn region_universe ( & self , r : RegionVid ) -> ty:: UniverseIndex {
617- let scc = self . constraint_sccs . scc ( r. to_region_vid ( ) ) ;
617+ let scc = self . constraint_sccs . scc ( r) ;
618618 self . scc_universes [ scc]
619619 }
620620
621621 /// Once region solving has completed, this function will return
622622 /// the member constraints that were applied to the value of a given
623623 /// region `r`. See `AppliedMemberConstraint`.
624- pub ( crate ) fn applied_member_constraints (
625- & self ,
626- r : impl ToRegionVid ,
627- ) -> & [ AppliedMemberConstraint ] {
628- let scc = self . constraint_sccs . scc ( r. to_region_vid ( ) ) ;
624+ pub ( crate ) fn applied_member_constraints ( & self , r : RegionVid ) -> & [ AppliedMemberConstraint ] {
625+ let scc = self . constraint_sccs . scc ( r) ;
629626 binary_search_util:: binary_search_slice (
630627 & self . member_constraints_applied ,
631628 |applied| applied. member_region_scc ,
@@ -1133,7 +1130,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
11331130 let r_vid = self . to_region_vid ( r) ;
11341131 let r_scc = self . constraint_sccs . scc ( r_vid) ;
11351132
1136- // The challenge if this. We have some region variable `r`
1133+ // The challenge is this. We have some region variable `r`
11371134 // whose value is a set of CFG points and universal
11381135 // regions. We want to find if that set is *equivalent* to
11391136 // any of the named regions found in the closure.
@@ -2234,7 +2231,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
22342231 r : RegionVid ,
22352232 body : & Body < ' _ > ,
22362233 ) -> Option < Location > {
2237- let scc = self . constraint_sccs . scc ( r. to_region_vid ( ) ) ;
2234+ let scc = self . constraint_sccs . scc ( r) ;
22382235 let locations = self . scc_values . locations_outlived_by ( scc) ;
22392236 for location in locations {
22402237 let bb = & body[ location. block ] ;
0 commit comments