Skip to main content

has_at_least_two_arms

Function has_at_least_two_arms 

Source
fn has_at_least_two_arms(expr: &MirScalarExpr) -> bool
Expand description

Returns true if the If-chain has at least 2 arms matching Eq(same_expr, literal). Bails early once 2 are found to avoid unnecessary traversal.