needs_par_as_let_scrutinee in rustc_ast::util::parser - Rust
Description: Suppose we have `let _ = e` and the `order` of `e`. Is the `order` such that `e` in `let _ = e` needs parentheses when it is on the RHS?

Skip to main content

## needs_par_as_let_scrutinee

# Function needs_par_as_let_scrutinee

Source

    pub fn needs_par_as_let_scrutinee(order: ExprPrecedence) -> bool

Expand description

Suppose we have `let _ = e` and the `order` of `e`. Is the `order` such that `e` in `let _ = e` needs parentheses when it is on the RHS?

Conversely, suppose that we have `(let _ = a) OP b` and `order` is that of `OP`. Can we print this as `let _ = a OP b`?