Struct rustc_hir::hir::Arm [−][src]
pub struct Arm<'hir> {
pub hir_id: HirId,
pub span: Span,
pub pat: &'hir Pat<'hir>,
pub guard: Option<Guard<'hir>>,
pub body: &'hir Expr<'hir>,
}Expand description
Represents a single arm of a match expression, e.g.
<pat> (if <guard>) => <body>.
Fields
hir_id: HirIdspan: Spanpat: &'hir Pat<'hir>Expand description
If this pattern and the optional guard matches, then body is evaluated.
guard: Option<Guard<'hir>>Expand description
Optional guard clause.
body: &'hir Expr<'hir>Expand description
The expression the arm evaluates to if this arm matches.
Trait Implementations
impl<'hir, __CTX> HashStable<__CTX> for Arm<'hir> where
__CTX: HashStableContext, [src]
impl<'hir, __CTX> HashStable<__CTX> for Arm<'hir> where
__CTX: HashStableContext, [src]