Struct rustc_mir::borrow_check::location::LocationTable [−][src]
pub(crate) struct LocationTable {
num_points: usize,
statements_before_block: IndexVec<BasicBlock, usize>,
}Expand description
Maps between a MIR Location, which identifies a particular
statement within a basic block, to a “rich location”, which
identifies at a finer granularity. In particular, we distinguish
the start of a statement and the mid-point. The mid-point is
the point just before the statement takes effect; in particular,
for an assignment A = B, it is the point where B is about to be
written into A. This mid-point is a kind of hack to work around
our inability to track the position information at sufficient
granularity through outlives relations; however, the rich location
table serves another purpose: it compresses locations from
multiple words into a single u32.
Fields
num_points: usizestatements_before_block: IndexVec<BasicBlock, usize>Implementations
impl LocationTable[src]
impl LocationTable[src]pub(crate) fn new(body: &Body<'_>) -> Self[src]
pub(crate) fn all_points(&self) -> impl Iterator<Item = LocationIndex>[src]
pub(crate) fn start_index(&self, location: Location) -> LocationIndex[src]
pub(crate) fn mid_index(&self, location: Location) -> LocationIndex[src]
pub(crate) fn to_location(&self, index: LocationIndex) -> RichLocation[src]
Auto Trait Implementations
impl RefUnwindSafe for LocationTable
impl Send for LocationTable
impl Sync for LocationTable
impl Unpin for LocationTable
impl UnwindSafe for LocationTable
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]