diff --git a/compiler/rustc_borrowck/src/region_infer/values.rs b/compiler/rustc_borrowck/src/region_infer/values.rs index 03630f0e2bc..2e15dee0c81 100644 --- a/compiler/rustc_borrowck/src/region_infer/values.rs +++ b/compiler/rustc_borrowck/src/region_infer/values.rs @@ -143,11 +143,10 @@ impl LivenessValues { self.points.insert(region, point); } - /// Adds all the elements in the given bit array into the given - /// region. Returns whether any of them are newly added. - pub(crate) fn add_elements(&mut self, region: N, locations: &IntervalSet) -> bool { - debug!("LivenessValues::add_elements(region={:?}, locations={:?})", region, locations); - self.points.union_row(region, locations) + /// Records `region` as being live at all the given `points`. + pub(crate) fn add_points(&mut self, region: N, points: &IntervalSet) { + debug!("LivenessValues::add_points(region={:?}, points={:?})", region, points); + self.points.union_row(region, points); } /// Records `region` as being live at all the control-flow points. diff --git a/compiler/rustc_borrowck/src/type_check/liveness/trace.rs b/compiler/rustc_borrowck/src/type_check/liveness/trace.rs index e616449ccd4..2cfbe8a3874 100644 --- a/compiler/rustc_borrowck/src/type_check/liveness/trace.rs +++ b/compiler/rustc_borrowck/src/type_check/liveness/trace.rs @@ -618,7 +618,7 @@ impl<'tcx> LivenessContext<'_, '_, '_, 'tcx> { .borrowck_context .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 // `-Zpolonius=next`.