Skip to content

Commit

Permalink
add explanatory comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jun 28, 2018
1 parent 5c06b23 commit cb34989
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/librustc_mir/borrow_check/places_conflict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>,
Expand Down

0 comments on commit cb34989

Please sign in to comment.