Struct rustc_mir::borrow_check::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: usizeImplementations
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 RegionValueElementsimpl Send for RegionValueElementsimpl Sync for RegionValueElementsimpl Unpin for RegionValueElementsimpl UnwindSafe for RegionValueElementsBlanket Implementations
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. 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