Struct rustc_middle::mir::Location [−][src]
pub struct Location {
pub block: BasicBlock,
pub statement_index: usize,
}Expand description
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: BasicBlockExpand description
The block that the location is within.
statement_index: usizeImplementations
impl Location[src]
impl Location[src]pub const START: Location[src]
pub fn successor_within_block(&self) -> 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]
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]
&self,
other: Location,
dominators: &Dominators<BasicBlock>
) -> bool
Trait Implementations
impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for Location[src]
impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for Location[src]fn hash_stable(
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)[src]
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)
impl Ord for Location[src]
impl Ord for Location[src]impl PartialOrd<Location> for Location[src]
impl PartialOrd<Location> for Location[src]fn partial_cmp(&self, other: &Location) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Location) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for Location[src]
impl Eq 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<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
T: Copy, [src]
impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
T: Copy, [src]pub fn allocate_on(Self, &'a Arena<'tcx>) -> &'a mut T[src]
pub fn allocate_from_iter(
&'a Arena<'tcx>,
impl IntoIterator<Item = T>
) -> &'a mut [T]ⓘ[src]
&'a Arena<'tcx>,
impl IntoIterator<Item = T>
) -> &'a mut [T]ⓘ
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> MaybeResult<T> for T[src]
impl<T> MaybeResult<T> for T[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]fn with_constness(self, constness: Constness) -> ConstnessAnd<Self>[src]
fn with_const(self) -> ConstnessAnd<Self>[src]
fn without_const(self) -> ConstnessAnd<Self>[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,