[][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.


num_points: usizestatements_before_block: IndexVec<BasicBlock, usize>


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[src]

impl Send for LocationTable[src]

impl Sync for LocationTable[src]

impl Unpin for LocationTable[src]

impl UnwindSafe for LocationTable[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]