Skip to main content

match_expr

Function match_expr 

Source
pub fn match_expr(
    cx: &mut Cx,
    subject: &Expr,
    cases: &mut [MatchCase<'_>],
) -> Result<MatchOutcome>
Expand description

Match an expression in declaration order using Shape captures and guards.

Captures from rejected patterns and false guards never escape into later cases, matching Python’s case-local binding policy.