[−][src]Struct rustc_middle::middle::region::FirstStatementIndex
Represents a subscope of block for a binding that is introduced
by block.stmts[first_statement_index]. Such subscopes represent
a suffix of the block. Note that each subscope does not include
the initializer expression, if any, for the statement indexed by
first_statement_index.
For example, given { let (a, b) = EXPR_1; let c = EXPR_2; ... }:
-
The subscope with
first_statement_index == 0is scope of bothaandb; it does not include EXPR_1, but does include everything after that firstlet. (If you want a scope that includes EXPR_1 as well, then do not useScope::Remainder, but instead anotherScopethat encompasses the whole block, e.g.,Scope::Node. -
The subscope with
first_statement_index == 1is scope ofc, and thus does not include EXPR_2, but covers the....
Fields
private: u32Implementations
impl FirstStatementIndex[src]
pub const MAX_AS_U32: u32[src]
pub const MAX: Self[src]
pub const fn from_usize(value: usize) -> Self[src]
pub const fn from_u32(value: u32) -> Self[src]
pub const unsafe fn from_u32_unchecked(value: u32) -> Self[src]
pub const fn index(self) -> usize[src]
Extracts the value of this index as an integer.
pub const fn as_u32(self) -> u32[src]
Extracts the value of this index as a u32.
pub const fn as_usize(self) -> usize[src]
Extracts the value of this index as a usize.
Trait Implementations
impl Add<usize> for FirstStatementIndex[src]
type Output = Self
The resulting type after applying the + operator.
pub fn add(self, other: usize) -> Self[src]
impl Clone for FirstStatementIndex[src]
pub fn clone(&self) -> Self[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for FirstStatementIndex[src]
impl Debug for FirstStatementIndex[src]
impl<D: Decoder> Decodable<D> for FirstStatementIndex[src]
impl<E: Encoder> Encodable<E> for FirstStatementIndex[src]
impl Eq for FirstStatementIndex[src]
impl From<FirstStatementIndex> for u32[src]
pub fn from(v: FirstStatementIndex) -> u32[src]
impl From<FirstStatementIndex> for usize[src]
pub fn from(v: FirstStatementIndex) -> usize[src]
impl From<u32> for FirstStatementIndex[src]
impl From<usize> for FirstStatementIndex[src]
impl Hash for FirstStatementIndex[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for FirstStatementIndex[src]
pub fn hash_stable(
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)[src]
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)
impl Idx for FirstStatementIndex[src]
pub fn new(value: usize) -> Self[src]
pub fn index(self) -> usize[src]
pub fn increment_by(&mut self, amount: usize)[src]
pub fn plus(self, amount: usize) -> Self[src]
impl Ord for FirstStatementIndex[src]
pub fn cmp(&self, other: &FirstStatementIndex) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self[src]
impl PartialEq<FirstStatementIndex> for FirstStatementIndex[src]
pub fn eq(&self, other: &FirstStatementIndex) -> bool[src]
pub fn ne(&self, other: &FirstStatementIndex) -> bool[src]
impl PartialOrd<FirstStatementIndex> for FirstStatementIndex[src]
pub fn partial_cmp(&self, other: &FirstStatementIndex) -> Option<Ordering>[src]
pub fn lt(&self, other: &FirstStatementIndex) -> bool[src]
pub fn le(&self, other: &FirstStatementIndex) -> bool[src]
pub fn gt(&self, other: &FirstStatementIndex) -> bool[src]
pub fn ge(&self, other: &FirstStatementIndex) -> bool[src]
impl Step for FirstStatementIndex[src]
pub fn steps_between(start: &Self, end: &Self) -> Option<usize>[src]
pub fn forward_checked(start: Self, u: usize) -> Option<Self>[src]
pub fn backward_checked(start: Self, u: usize) -> Option<Self>[src]
pub fn forward(start: Self, count: usize) -> Self[src]
pub unsafe fn forward_unchecked(start: Self, count: usize) -> Self[src]
pub fn backward(start: Self, count: usize) -> Self[src]
pub unsafe fn backward_unchecked(start: Self, count: usize) -> Self[src]
impl StructuralEq for FirstStatementIndex[src]
impl StructuralPartialEq for FirstStatementIndex[src]
Auto Trait Implementations
impl RefUnwindSafe for FirstStatementIndex
impl Send for FirstStatementIndex
impl Sync for FirstStatementIndex
impl Unpin for FirstStatementIndex
impl UnwindSafe for FirstStatementIndex
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
T: Copy, [src]
T: Copy,
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> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> MaybeResult<T> for T[src]
type Error = !
pub fn from(Result<T, <T as MaybeResult<T>>::Error>) -> T[src]
pub fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.