1
Fork 0

refer to points and not "elements", and remove unused return value

This commit is contained in:
Rémy Rakic 2023-11-13 14:54:07 +00:00
parent fb94626431
commit c8feeb6ced
2 changed files with 5 additions and 6 deletions

View file

@ -143,11 +143,10 @@ impl<N: Idx> LivenessValues<N> {
self.points.insert(region, point); self.points.insert(region, point);
} }
/// Adds all the elements in the given bit array into the given /// Records `region` as being live at all the given `points`.
/// region. Returns whether any of them are newly added. pub(crate) fn add_points(&mut self, region: N, points: &IntervalSet<PointIndex>) {
pub(crate) fn add_elements(&mut self, region: N, locations: &IntervalSet<PointIndex>) -> bool { debug!("LivenessValues::add_points(region={:?}, points={:?})", region, points);
debug!("LivenessValues::add_elements(region={:?}, locations={:?})", region, locations); self.points.union_row(region, points);
self.points.union_row(region, locations)
} }
/// Records `region` as being live at all the control-flow points. /// Records `region` as being live at all the control-flow points.

View file

@ -618,7 +618,7 @@ impl<'tcx> LivenessContext<'_, '_, '_, 'tcx> {
.borrowck_context .borrowck_context
.constraints .constraints
.liveness_constraints .liveness_constraints
.add_elements(live_region_vid, live_at); .add_points(live_region_vid, live_at);
// There can only be inflowing loans for this region when we are using // There can only be inflowing loans for this region when we are using
// `-Zpolonius=next`. // `-Zpolonius=next`.