File tree 2 files changed +8
-8
lines changed
compiler/rustc_borrowck/src/region_infer
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1963,15 +1963,15 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1963
1963
None
1964
1964
}
1965
1965
1966
- /// Finds some region R such that `fr1: R` and `R` is live at `elem `.
1966
+ /// Finds some region R such that `fr1: R` and `R` is live at `location `.
1967
1967
#[ instrument( skip( self ) , level = "trace" , ret) ]
1968
- pub ( crate ) fn find_sub_region_live_at ( & self , fr1 : RegionVid , elem : Location ) -> RegionVid {
1968
+ pub ( crate ) fn find_sub_region_live_at ( & self , fr1 : RegionVid , location : Location ) -> RegionVid {
1969
1969
trace ! ( scc = ?self . constraint_sccs. scc( fr1) ) ;
1970
1970
trace ! ( universe = ?self . scc_universes[ self . constraint_sccs. scc( fr1) ] ) ;
1971
1971
self . find_constraint_paths_between_regions ( fr1, |r| {
1972
- // First look for some `r` such that `fr1: r` and `r` is live at `elem `
1972
+ // First look for some `r` such that `fr1: r` and `r` is live at `location `
1973
1973
trace ! ( ?r, liveness_constraints=?self . liveness_constraints. region_value_str( r) ) ;
1974
- self . liveness_constraints . contains ( r, elem )
1974
+ self . liveness_constraints . is_live_at ( r, location )
1975
1975
} )
1976
1976
. or_else ( || {
1977
1977
// If we fail to find that, we may find some `r` such that
Original file line number Diff line number Diff line change @@ -154,10 +154,10 @@ impl<N: Idx> LivenessValues<N> {
154
154
self . points . insert_all_into_row ( region) ;
155
155
}
156
156
157
- /// Returns `true` if the region `region` contains the given element .
158
- pub ( crate ) fn contains ( & self , region : N , location : Location ) -> bool {
159
- let index = self . elements . point_from_location ( location) ;
160
- self . points . row ( region) . is_some_and ( |r| r. contains ( index ) )
157
+ /// Returns whether `region` is marked live at the given `location` .
158
+ pub ( crate ) fn is_live_at ( & self , region : N , location : Location ) -> bool {
159
+ let point = self . elements . point_from_location ( location) ;
160
+ self . points . row ( region) . is_some_and ( |r| r. contains ( point ) )
161
161
}
162
162
163
163
/// Returns an iterator of all the elements contained by `region`.
You can’t perform that action at this time.
0 commit comments