[−][src]Struct rustc_hir::Local

pub struct Local<'hir> {
    pub pat: &'hir Pat<'hir>,
    pub ty: Option<&'hir Ty<'hir>>,
    pub init: Option<&'hir Expr<'hir>>,
    pub hir_id: HirId,
    pub span: Span,
    pub attrs: AttrVec,
    pub source: LocalSource,
}

Represents a let statement (i.e., let <pat>:<ty> = <expr>;).

Fields

pat: &'hir Pat<'hir>ty: Option<&'hir Ty<'hir>>

Type annotation, if any (otherwise the type will be inferred).

init: Option<&'hir Expr<'hir>>

Initializer expression to set the value, if any.

hir_id: HirIdspan: Spanattrs: AttrVecsource: LocalSource

Can be ForLoopDesugar if the let statement is part of a for loop desugaring. Otherwise will be Normal.

Trait Implementations

impl<'hir> Debug for Local<'hir>[src]

impl<'hir, __CTX> HashStable<__CTX> for Local<'hir> where
    __CTX: HashStableContext, 
[src]

Auto Trait Implementations

impl<'hir> !RefUnwindSafe for Local<'hir>

impl<'hir> !Send for Local<'hir>

impl<'hir> !Sync for Local<'hir>

impl<'hir> Unpin for Local<'hir>

impl<'hir> !UnwindSafe for Local<'hir>

Blanket Implementations

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

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

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

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

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

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.