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 @@ -2045,15 +2045,15 @@ impl<'tcx> Place<'tcx> {
20452045 }
20462046 }
20472047
2048- /// Recursively "unroll" a place into a `PlaceComponents` list,
2048+ /// Recursively "iterates" over place components, generating a `PlaceComponents` list,
20492049 /// invoking `op` with a `PlaceComponentsIter`.
2050- pub fn unroll < R > (
2050+ pub fn iterate < R > (
20512051 & self ,
20522052 next : Option < & PlaceComponents < ' _ , ' tcx > > ,
20532053 op : impl FnOnce ( PlaceComponentsIter < ' _ , ' tcx > ) -> R ,
20542054 ) -> R {
20552055 match self {
2056- Place :: Projection ( interior) => interior. base . unroll (
2056+ Place :: Projection ( interior) => interior. base . iterate (
20572057 Some ( & PlaceComponents {
20582058 component : self ,
20592059 next,
@@ -2076,7 +2076,7 @@ impl<'tcx> Place<'tcx> {
20762076/// A linked list of places running up the stack; begins with the
20772077/// innermost place and extends to projections (e.g., `a.b` would have
20782078/// the place `a` with a "next" pointer to `a.b`). Created by
2079- /// `Place::unroll `.
2079+ /// `Place::iterate `.
20802080///
20812081/// N.B., this particular impl strategy is not the most obvious. It was
20822082/// 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