Skip to content

Commit accfdcc

Browse files
committed
rename add to add_element
1 parent ed72950 commit accfdcc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/librustc_mir/borrow_check/nll/region_infer/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
309309

310310
// Add all nodes in the CFG to liveness constraints
311311
for point_index in self.elements.all_point_indices() {
312-
self.liveness_constraints.add(
312+
self.liveness_constraints.add_element(
313313
variable,
314314
point_index,
315315
&Cause::UniversalRegion(variable),
@@ -318,7 +318,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
318318

319319
// Add `end(X)` into the set for X.
320320
self.liveness_constraints
321-
.add(variable, variable, &Cause::UniversalRegion(variable));
321+
.add_element(variable, variable, &Cause::UniversalRegion(variable));
322322
}
323323
}
324324

@@ -367,7 +367,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
367367
debug!("add_live_point: @{:?} Adding cause {:?}", point, cause);
368368

369369
let element = self.elements.index(point);
370-
if self.liveness_constraints.add(v, element, &cause) {
370+
if self.liveness_constraints.add_element(v, element, &cause) {
371371
true
372372
} else {
373373
false

src/librustc_mir/borrow_check/nll/region_infer/values.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ impl RegionValues {
239239

240240
/// Adds the given element to the value for the given region. Returns true if
241241
/// the element is newly added (i.e., was not already present).
242-
pub(super) fn add<E: ToElementIndex>(&mut self, r: RegionVid, elem: E, cause: &Cause) -> bool {
242+
pub(super) fn add_element<E: ToElementIndex>(&mut self, r: RegionVid, elem: E, cause: &Cause) -> bool {
243243
let i = self.elements.index(elem);
244244
self.add_internal(r, i, |_| cause.clone())
245245
}

0 commit comments

Comments
 (0)