1
Fork 0

Inline npals closure

This commit is contained in:
David Tolnay 2023-11-29 21:06:06 -08:00
parent 419b26931b
commit d2b7bd4774
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -1159,8 +1159,11 @@ impl<'a> State<'a> {
self.print_pat(pat); self.print_pat(pat);
self.space(); self.space();
self.word_space("="); self.word_space("=");
let npals = || parser::needs_par_as_let_scrutinee(expr.precedence().order()); self.print_expr_cond_paren(
self.print_expr_cond_paren(expr, Self::cond_needs_par(expr) || npals()) expr,
Self::cond_needs_par(expr)
|| parser::needs_par_as_let_scrutinee(expr.precedence().order()),
);
} }
fn print_mac(&mut self, m: &ast::MacCall) { fn print_mac(&mut self, m: &ast::MacCall) {