diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-06-28 08:34:04 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-06-28 08:34:04 -0400 |
| commit | cb349893320008f2cd9fcd42622564fc3b341b2b (patch) | |
| tree | 4b35a0eb7efe2cd458ff9cf5d5d24c90dfca3b89 | |
| parent | 5c06b23025b587f8665b2177369ad4a1da4d2153 (diff) | |
| download | rust-cb349893320008f2cd9fcd42622564fc3b341b2b.tar.gz rust-cb349893320008f2cd9fcd42622564fc3b341b2b.zip | |
add explanatory comment
| -rw-r--r-- | src/librustc_mir/borrow_check/places_conflict.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_mir/borrow_check/places_conflict.rs b/src/librustc_mir/borrow_check/places_conflict.rs index 92f5dc76bfc..24bd675fac2 100644 --- a/src/librustc_mir/borrow_check/places_conflict.rs +++ b/src/librustc_mir/borrow_check/places_conflict.rs @@ -219,6 +219,10 @@ fn place_components_conflict<'gcx, 'tcx>( /// innermost place and extends to projections (e.g., `a.b` would have /// the place `a` with a "next" pointer to `a.b`). Created by /// `unroll_place`. +/// +/// NB: This particular impl strategy is not the most obvious. It was +/// chosen because it makes a measurable difference to NLL +/// performance, as this code (`places_conflict`) is somewhat hot. struct PlaceComponents<'p, 'tcx: 'p> { component: &'p Place<'tcx>, next: Option<&'p PlaceComponents<'p, 'tcx>>, |
