about summary refs log tree commit diff
path: root/tests/ui/macros
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 /tests/ui/macros
parentc5a0eb12466b6591bc3a3d373c51fabd19735533 (diff)
downloadrust-7f2ffbdbc6c0d5e1c7fabe0bef56ec49d10bfeab.tar.gz
rust-7f2ffbdbc6c0d5e1c7fabe0bef56ec49d10bfeab.zip
Fix pretty printer statement boundaries after braced macro call
Diffstat (limited to 'tests/ui/macros')
-rw-r--r--tests/ui/macros/stringify.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/macros/stringify.rs b/tests/ui/macros/stringify.rs
index df1cf5d8a91..a66a5513ffa 100644
--- a/tests/ui/macros/stringify.rs
+++ b/tests/ui/macros/stringify.rs
@@ -225,7 +225,7 @@ fn test_expr() {
     );
     c2_match_arm!(
         [ m! {} - 1 ],
-        "match () { _ => m! {} - 1, }",
+        "match () { _ => (m! {}) - 1, }", // parenthesis is redundant
         "match () { _ => m! {} - 1 }",
     );
 
@@ -747,7 +747,7 @@ fn test_stmt() {
     );
     c2_minus_one!(
         [ m! {} ],
-        "m! {} - 1;", // FIXME(dtolnay): needs parens, otherwise this is 2 separate statements
+        "(m! {}) - 1;",
         "m! {} - 1"
     );