@@ -644,11 +644,12 @@ impl<'tcx> RegionInferenceContext<'tcx> {
644
644
self . scc_universes [ scc]
645
645
}
646
646
647
- /// Once region solving has completed, this function will return
648
- /// the member constraints that were applied to the value of a given
649
- /// region `r`. See `AppliedMemberConstraint`.
650
- pub ( crate ) fn applied_member_constraints ( & self , r : RegionVid ) -> & [ AppliedMemberConstraint ] {
651
- let scc = self . constraint_sccs . scc ( r) ;
647
+ /// Once region solving has completed, this function will return the member constraints that
648
+ /// were applied to the value of a given SCC `scc`. See `AppliedMemberConstraint`.
649
+ pub ( crate ) fn applied_member_constraints (
650
+ & self ,
651
+ scc : ConstraintSccIndex ,
652
+ ) -> & [ AppliedMemberConstraint ] {
652
653
binary_search_util:: binary_search_slice (
653
654
& self . member_constraints_applied ,
654
655
|applied| applied. member_region_scc ,
@@ -1945,7 +1946,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1945
1946
// Member constraints can also give rise to `'r: 'x` edges that
1946
1947
// were not part of the graph initially, so watch out for those.
1947
1948
// (But they are extremely rare; this loop is very cold.)
1948
- for constraint in self . applied_member_constraints ( r ) {
1949
+ for constraint in self . applied_member_constraints ( self . constraint_sccs . scc ( r ) ) {
1949
1950
let p_c = & self . member_constraints [ constraint. member_constraint_index ] ;
1950
1951
let constraint = OutlivesConstraint {
1951
1952
sup : r,
0 commit comments