Skip to content

Commit

Permalink
rename add to add_element
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed May 10, 2018
1 parent ed72950 commit accfdcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/librustc_mir/borrow_check/nll/region_infer/mod.rs
Expand Up @@ -309,7 +309,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {

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

// Add `end(X)` into the set for X.
self.liveness_constraints
.add(variable, variable, &Cause::UniversalRegion(variable));
.add_element(variable, variable, &Cause::UniversalRegion(variable));
}
}

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

let element = self.elements.index(point);
if self.liveness_constraints.add(v, element, &cause) {
if self.liveness_constraints.add_element(v, element, &cause) {
true
} else {
false
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/borrow_check/nll/region_infer/values.rs
Expand Up @@ -239,7 +239,7 @@ impl RegionValues {

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

0 comments on commit accfdcc

Please sign in to comment.