Skip to content

Commit 53fa32f

Browse files
committed
Place::unroll -> Place::iterate
1 parent 66fe4ff commit 53fa32f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/librustc/mir/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,15 +2059,15 @@ impl<'tcx> Place<'tcx> {
20592059
}
20602060
}
20612061

2062-
/// Recursively "unroll" a place into a `PlaceComponents` list,
2062+
/// Recursively "iterates" over place components, generating a `PlaceComponents` list,
20632063
/// invoking `op` with a `PlaceComponentsIter`.
2064-
pub fn unroll<R>(
2064+
pub fn iterate<R>(
20652065
&self,
20662066
next: Option<&PlaceComponents<'_, 'tcx>>,
20672067
op: impl FnOnce(PlaceComponentsIter<'_, 'tcx>) -> R,
20682068
) -> R {
20692069
match self {
2070-
Place::Projection(interior) => interior.base.unroll(
2070+
Place::Projection(interior) => interior.base.iterate(
20712071
Some(&PlaceComponents {
20722072
component: self,
20732073
next,
@@ -2089,7 +2089,7 @@ impl<'tcx> Place<'tcx> {
20892089
/// A linked list of places running up the stack; begins with the
20902090
/// innermost place and extends to projections (e.g., `a.b` would have
20912091
/// the place `a` with a "next" pointer to `a.b`). Created by
2092-
/// `Place::unroll`.
2092+
/// `Place::iterate`.
20932093
///
20942094
/// N.B., this particular impl strategy is not the most obvious. It was
20952095
/// chosen because it makes a measurable difference to NLL

src/librustc_mir/borrow_check/places_conflict.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ pub(super) fn borrow_conflicts_with_place<'gcx, 'tcx>(
6767
}
6868
}
6969

70-
borrow_place.unroll(None, |borrow_components| {
71-
access_place.unroll(None, |access_components| {
70+
borrow_place.iterate(None, |borrow_components| {
71+
access_place.iterate(None, |access_components| {
7272
place_components_conflict(
7373
tcx,
7474
mir,

0 commit comments

Comments
 (0)