[][src]Struct rustc_mir::borrow_check::location::LocationTable

pub(crate) struct LocationTable {
    num_points: usize,
    statements_before_block: IndexVec<BasicBlock, usize>,
}

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]

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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]