File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
librustc_mir/borrow_check Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments