Enum rustc_mir_build::build::LocalsForNode[−][src]

enum LocalsForNode {
    One(Local),
    ForGuard {
        ref_for_guard: Local,
        for_arm_body: Local,
    },
}

Variants

One(Local)
Expand description

In the usual case, a HirId for an identifier maps to at most one Local declaration.

ForGuard
Expand description

The exceptional case is identifiers in a match arm’s pattern that are referenced in a guard of that match arm. For these, we have 2 Locals.

  • for_arm_body is the Local used in the arm body (which is just like the One case above),

  • ref_for_guard is the Local used in the arm’s guard (which is a reference to a temp that is an alias of for_arm_body).

Show fields

Fields of ForGuard

ref_for_guard: Localfor_arm_body: Local

Implementations

impl LocalsForNode[src]

fn local_id(&self, for_guard: ForGuard) -> Local[src]

Trait Implementations

impl Debug for LocalsForNode[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl RefUnwindSafe for LocalsForNode

impl Send for LocalsForNode

impl Sync for LocalsForNode

impl Unpin for LocalsForNode

impl UnwindSafe for LocalsForNode

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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