Skip to main content

origin_matches

Function origin_matches 

Source
fn origin_matches(
    gcx: Gcx<'_>,
    expr: &Expr<'_>,
    depth: u8,
    vars: &HashSet<VariableId>,
    base: fn(Gcx<'_>, &Expr<'_>) -> bool,
) -> bool
Expand description

True when expr is base(..) or a variable in vars, through parens, payable(..), casts, ternaries whose both arms qualify and no-arg helpers whose body returns such an expression.