File tree 2 files changed +6
-6
lines changed
librustc_mir/borrow_check
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> {
2045
2045
}
2046
2046
}
2047
2047
2048
- /// Recursively "unroll" a place into a `PlaceComponents` list,
2048
+ /// Recursively "iterates" over place components, generating a `PlaceComponents` list,
2049
2049
/// invoking `op` with a `PlaceComponentsIter`.
2050
- pub fn unroll < R > (
2050
+ pub fn iterate < R > (
2051
2051
& self ,
2052
2052
next : Option < & PlaceComponents < ' _ , ' tcx > > ,
2053
2053
op : impl FnOnce ( PlaceComponentsIter < ' _ , ' tcx > ) -> R ,
2054
2054
) -> R {
2055
2055
match self {
2056
- Place :: Projection ( interior) => interior. base . unroll (
2056
+ Place :: Projection ( interior) => interior. base . iterate (
2057
2057
Some ( & PlaceComponents {
2058
2058
component : self ,
2059
2059
next,
@@ -2076,7 +2076,7 @@ impl<'tcx> Place<'tcx> {
2076
2076
/// A linked list of places running up the stack; begins with the
2077
2077
/// innermost place and extends to projections (e.g., `a.b` would have
2078
2078
/// the place `a` with a "next" pointer to `a.b`). Created by
2079
- /// `Place::unroll `.
2079
+ /// `Place::iterate `.
2080
2080
///
2081
2081
/// N.B., this particular impl strategy is not the most obvious. It was
2082
2082
/// 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>(
67
67
}
68
68
}
69
69
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| {
72
72
place_components_conflict (
73
73
tcx,
74
74
mir,
You can’t perform that action at this time.
0 commit comments