about summary refs log tree commit diff
path: root/compiler/rustc_ast_pretty/src
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2023-12-27 17:30:54 -0800
committerDavid Tolnay <dtolnay@gmail.com>2024-05-11 15:49:01 -0700
commit7f2ffbdbc6c0d5e1c7fabe0bef56ec49d10bfeab (patch)
tree9b94dfcc460f6556255f7e3502e3742d729ff5e5 /compiler/rustc_ast_pretty/src
parentc5a0eb12466b6591bc3a3d373c51fabd19735533 (diff)
downloadrust-7f2ffbdbc6c0d5e1c7fabe0bef56ec49d10bfeab.tar.gz
rust-7f2ffbdbc6c0d5e1c7fabe0bef56ec49d10bfeab.zip
Fix pretty printer statement boundaries after braced macro call
Diffstat (limited to 'compiler/rustc_ast_pretty/src')
-rw-r--r--compiler/rustc_ast_pretty/src/pprust/state/fixup.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state/fixup.rs b/compiler/rustc_ast_pretty/src/pprust/state/fixup.rs
index 9934f972f9b..d21cb82f83b 100644
--- a/compiler/rustc_ast_pretty/src/pprust/state/fixup.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/state/fixup.rs
@@ -128,11 +128,7 @@ impl FixupContext {
     /// The documentation on `FixupContext::leftmost_subexpression_in_stmt` has
     /// examples.
     pub fn would_cause_statement_boundary(self, expr: &Expr) -> bool {
-        self.leftmost_subexpression_in_stmt
-            && match expr.kind {
-                ExprKind::MacCall(_) => false,
-                _ => !classify::expr_requires_semi_to_be_stmt(expr),
-            }
+        self.leftmost_subexpression_in_stmt && !classify::expr_requires_semi_to_be_stmt(expr)
     }
 
     /// Determine whether parentheses are needed around the given `let`