rename add
to add_element
This commit is contained in:
parent
ed72950fde
commit
accfdcc905
2 changed files with 4 additions and 4 deletions
|
@ -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),
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue