diff options
| author | David Tolnay <dtolnay@gmail.com> | 2023-12-29 16:28:47 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2024-05-11 15:48:58 -0700 |
| commit | cbb8714a3f8a04cce698719df338fb095c40f479 (patch) | |
| tree | 879c1e33e0af831225249de1c1f0233afaf0c96e /compiler/rustc_ast_pretty/src/pprust/state.rs | |
| parent | b431eec6f28d64cd3852584f9a59736c6c09ee68 (diff) | |
| download | rust-cbb8714a3f8a04cce698719df338fb095c40f479.tar.gz rust-cbb8714a3f8a04cce698719df338fb095c40f479.zip | |
Mark expr_requires_semi_to_be_stmt call sites
For each of these, we need to decide whether they need to be using `expr_requires_semi_to_be_stmt`, or `expr_requires_comma_to_be_match_arm`, which are supposed to be 2 different behaviors. Previously they were conflated into one, causing either too much or too little parenthesization.
Diffstat (limited to 'compiler/rustc_ast_pretty/src/pprust/state.rs')
| -rw-r--r-- | compiler/rustc_ast_pretty/src/pprust/state.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state.rs b/compiler/rustc_ast_pretty/src/pprust/state.rs index 2c176828c84..be98b7d37d4 100644 --- a/compiler/rustc_ast_pretty/src/pprust/state.rs +++ b/compiler/rustc_ast_pretty/src/pprust/state.rs @@ -1253,7 +1253,7 @@ impl<'a> State<'a> { ast::StmtKind::Expr(expr) => { self.space_if_not_bol(); self.print_expr_outer_attr_style(expr, false, FixupContext::new_stmt()); - if classify::expr_requires_semi_to_be_stmt(expr) { + if classify::expr_requires_semi_to_be_stmt_FIXME(expr) { self.word(";"); } } |
