Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Nov 13, 2023
1 parent 23bc9c6 commit b4c7d1d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions compiler/rustc_borrowck/src/region_infer/values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,15 @@ pub(crate) enum RegionElement {
PlaceholderRegion(ty::PlaceholderRegion),
}

/// When we initially compute liveness, we use an interval matrix storing
/// liveness ranges for each region-vid.
/// Records the CFG locations where each region is live. When we initially compute liveness, we use
/// an interval matrix storing liveness ranges for each region-vid.
pub(crate) struct LivenessValues<N: Idx> {
elements: Rc<RegionValueElements>,
points: SparseIntervalMatrix<N, PointIndex>,
}

impl<N: Idx> LivenessValues<N> {
/// Creates a new set of "region values" that tracks causal information.
/// Each of the regions in num_region_variables will be initialized with an
/// empty set of points and no causal information.
/// Create an empty map of regions to locations where they're live.
pub(crate) fn new(elements: Rc<RegionValueElements>) -> Self {
Self { points: SparseIntervalMatrix::new(elements.num_points), elements }
}
Expand Down

0 comments on commit b4c7d1d

Please sign in to comment.