Skip to content

Commit cb34989

Browse files
committed
add explanatory comment
1 parent 5c06b23 commit cb34989

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustc_mir/borrow_check/places_conflict.rs

+4
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ fn place_components_conflict<'gcx, 'tcx>(
219219
/// innermost place and extends to projections (e.g., `a.b` would have
220220
/// the place `a` with a "next" pointer to `a.b`). Created by
221221
/// `unroll_place`.
222+
///
223+
/// NB: This particular impl strategy is not the most obvious. It was
224+
/// chosen because it makes a measurable difference to NLL
225+
/// performance, as this code (`places_conflict`) is somewhat hot.
222226
struct PlaceComponents<'p, 'tcx: 'p> {
223227
component: &'p Place<'tcx>,
224228
next: Option<&'p PlaceComponents<'p, 'tcx>>,

0 commit comments

Comments
 (0)