[][src]Struct rustc_middle::mir::Location

pub struct Location {
    pub block: BasicBlock,
    pub statement_index: usize,
}

Location represents the position of the start of the statement; or, if statement_index equals the number of statements, then the start of the terminator.

Fields

block: BasicBlock

The block that the location is within.

statement_index: usize

Implementations

impl Location[src]

pub const START: Location[src]

pub fn successor_within_block(&self) -> Location[src]

Returns the location immediately after this one within the enclosing block.

Note that if this location represents a terminator, then the resulting location would be out of bounds and invalid.

pub fn is_predecessor_of<'tcx>(
    &self,
    other: Location,
    body: &Body<'tcx>
) -> bool
[src]

Returns true if other is earlier in the control flow graph than self.

pub fn dominates(
    &self,
    other: Location,
    dominators: &Dominators<BasicBlock>
) -> bool
[src]

Trait Implementations

impl Clone for Location[src]

impl Copy for Location[src]

impl Debug for Location[src]

impl Eq for Location[src]

impl Hash for Location[src]

impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for Location[src]

impl Ord for Location[src]

impl PartialEq<Location> for Location[src]

impl PartialOrd<Location> for Location[src]

impl StructuralEq for Location[src]

impl StructuralPartialEq for Location[src]

Auto Trait Implementations

impl RefUnwindSafe for Location

impl Send for Location

impl Sync for Location

impl Unpin for Location

impl UnwindSafe for Location

Blanket Implementations

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

impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
    T: Copy
[src]

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

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

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<Ctxt, T> DepNodeParams<Ctxt> for T where
    Ctxt: DepContext,
    T: HashStable<<Ctxt as DepContext>::StableHashingContext> + Debug
[src]

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

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

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

type Error = !

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]