Skip to content

Commit c8feeb6

Browse files
committed
refer to points and not "elements", and remove unused return value
1 parent fb94626 commit c8feeb6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

compiler/rustc_borrowck/src/region_infer/values.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,10 @@ impl<N: Idx> LivenessValues<N> {
143143
self.points.insert(region, point);
144144
}
145145

146-
/// Adds all the elements in the given bit array into the given
147-
/// region. Returns whether any of them are newly added.
148-
pub(crate) fn add_elements(&mut self, region: N, locations: &IntervalSet<PointIndex>) -> bool {
149-
debug!("LivenessValues::add_elements(region={:?}, locations={:?})", region, locations);
150-
self.points.union_row(region, locations)
146+
/// Records `region` as being live at all the given `points`.
147+
pub(crate) fn add_points(&mut self, region: N, points: &IntervalSet<PointIndex>) {
148+
debug!("LivenessValues::add_points(region={:?}, points={:?})", region, points);
149+
self.points.union_row(region, points);
151150
}
152151

153152
/// Records `region` as being live at all the control-flow points.

compiler/rustc_borrowck/src/type_check/liveness/trace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ impl<'tcx> LivenessContext<'_, '_, '_, 'tcx> {
618618
.borrowck_context
619619
.constraints
620620
.liveness_constraints
621-
.add_elements(live_region_vid, live_at);
621+
.add_points(live_region_vid, live_at);
622622

623623
// There can only be inflowing loans for this region when we are using
624624
// `-Zpolonius=next`.

0 commit comments

Comments
 (0)