Skip to content

Commit d2b7bd4

Browse files
committed
Inline npals closure
1 parent 419b269 commit d2b7bd4

File tree

1 file changed

+5
-2
lines changed
  • compiler/rustc_ast_pretty/src/pprust

1 file changed

+5
-2
lines changed

compiler/rustc_ast_pretty/src/pprust/state.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,8 +1159,11 @@ impl<'a> State<'a> {
11591159
self.print_pat(pat);
11601160
self.space();
11611161
self.word_space("=");
1162-
let npals = || parser::needs_par_as_let_scrutinee(expr.precedence().order());
1163-
self.print_expr_cond_paren(expr, Self::cond_needs_par(expr) || npals())
1162+
self.print_expr_cond_paren(
1163+
expr,
1164+
Self::cond_needs_par(expr)
1165+
|| parser::needs_par_as_let_scrutinee(expr.precedence().order()),
1166+
);
11641167
}
11651168

11661169
fn print_mac(&mut self, m: &ast::MacCall) {

0 commit comments

Comments
 (0)