iterate over regions and not "rows" in liveness values

This commit is contained in:
Rémy Rakic 2023-11-13 14:44:17 +00:00
parent 4e5fe71ca6
commit 3e3e7a023f
3 changed files with 3 additions and 3 deletions

View File

@ -359,7 +359,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
let mut scc_values =
RegionValues::new(elements, universal_regions.len(), &placeholder_indices);
for region in liveness_constraints.rows() {
for region in liveness_constraints.regions() {
let scc = constraint_sccs.scc(region);
scc_values.merge_liveness(scc, region, &liveness_constraints);
}

View File

@ -132,7 +132,7 @@ impl<N: Idx> LivenessValues<N> {
}
/// Iterate through each region that has a value in this set.
pub(crate) fn rows(&self) -> impl Iterator<Item = N> {
pub(crate) fn regions(&self) -> impl Iterator<Item = N> {
self.points.rows()
}

View File

@ -592,7 +592,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
}
self.cx.borrowck_context.constraints.outlives_constraints.push(constraint)
}
for region in liveness_constraints.rows() {
for region in liveness_constraints.regions() {
// If the region is live at at least one location in the promoted MIR,
// then add a liveness constraint to the main MIR for this region
// at the location provided as an argument to this method