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

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.


block: BasicBlock

The block that the location is within.

statement_index: usize


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>(
    other: Location,
    body: &Body<'tcx>
) -> bool

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

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

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

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

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

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

impl<'a, T> Captures<'a> 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> MaybeResult<T> for T[src]

type Error = !

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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]