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 @@ -2059,15 +2059,15 @@ impl<'tcx> Place<'tcx> {
2059
2059
}
2060
2060
}
2061
2061
2062
- /// Recursively "unroll" a place into a `PlaceComponents` list,
2062
+ /// Recursively "iterates" over place components, generating a `PlaceComponents` list,
2063
2063
/// invoking `op` with a `PlaceComponentsIter`.
2064
- pub fn unroll < R > (
2064
+ pub fn iterate < R > (
2065
2065
& self ,
2066
2066
next : Option < & PlaceComponents < ' _ , ' tcx > > ,
2067
2067
op : impl FnOnce ( PlaceComponentsIter < ' _ , ' tcx > ) -> R ,
2068
2068
) -> R {
2069
2069
match self {
2070
- Place :: Projection ( interior) => interior. base . unroll (
2070
+ Place :: Projection ( interior) => interior. base . iterate (
2071
2071
Some ( & PlaceComponents {
2072
2072
component : self ,
2073
2073
next,
@@ -2089,7 +2089,7 @@ impl<'tcx> Place<'tcx> {
2089
2089
/// A linked list of places running up the stack; begins with the
2090
2090
/// innermost place and extends to projections (e.g., `a.b` would have
2091
2091
/// the place `a` with a "next" pointer to `a.b`). Created by
2092
- /// `Place::unroll `.
2092
+ /// `Place::iterate `.
2093
2093
///
2094
2094
/// N.B., this particular impl strategy is not the most obvious. It was
2095
2095
/// 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