Struct rustc_hir::Local [−][src]
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 source: LocalSource,
}Expand description
Represents a let statement (i.e., let <pat>:<ty> = <expr>;).
Fields
pat: &'hir Pat<'hir>ty: Option<&'hir Ty<'hir>>Expand description
Type annotation, if any (otherwise the type will be inferred).
init: Option<&'hir Expr<'hir>>Expand description
Initializer expression to set the value, if any.
hir_id: HirIdspan: Spansource: LocalSourceExpand description
Can be ForLoopDesugar if the let statement is part of a for loop
desugaring. Otherwise will be Normal.
Trait Implementations
impl<'hir, __CTX> HashStable<__CTX> for Local<'hir> where
__CTX: HashStableContext, [src]
impl<'hir, __CTX> HashStable<__CTX> for Local<'hir> where
__CTX: HashStableContext, [src]