Skip to main content

leads_with_fusable_unary

Function leads_with_fusable_unary 

Source
fn leads_with_fusable_unary(expr: &Expr<'_>) -> bool
Expand description

Whether the leftmost operand of expr is a - or ~ unary, following the left spine of binary and ternary expressions. rhs.span begins at that leading unary, so a fused =- / =~ is caught whether the unary is the whole RHS (x =- a) or only leads it (x =- a + 1).