Struct rustc_borrowck::region_infer::values::RegionValueElements [−][src]
pub(crate) struct RegionValueElements {
statements_before_block: IndexVec<BasicBlock, usize>,
basic_blocks: IndexVec<PointIndex, BasicBlock>,
num_points: usize,
}
Expand description
Maps between a Location
and a PointIndex
(and vice versa).
Fields
statements_before_block: IndexVec<BasicBlock, usize>
For each basic block, how many points are contained within?
basic_blocks: IndexVec<PointIndex, BasicBlock>
Map backward from each point to the basic block that it belongs to.
num_points: usize
Implementations
Total number of point indices
Converts a Location
into a PointIndex
. O(1).
Converts a Location
into a PointIndex
. O(1).
Converts a PointIndex
back to a location. O(1).
Sometimes we get point-indices back from bitsets that may be out of range (because they round up to the nearest 2^N number of bits). Use this function to filter such points out if you like.
pub(crate) fn push_predecessors(
&self,
body: &Body<'_>,
index: PointIndex,
stack: &mut Vec<PointIndex>
)
pub(crate) fn push_predecessors(
&self,
body: &Body<'_>,
index: PointIndex,
stack: &mut Vec<PointIndex>
)
Pushes all predecessors of index
onto stack
.
Auto Trait Implementations
impl RefUnwindSafe for RegionValueElements
impl Send for RegionValueElements
impl Sync for RegionValueElements
impl Unpin for RegionValueElements
impl UnwindSafe for RegionValueElements
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes