]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/rustfmt/tests/target/match-nowrap-trailing-comma.rs
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / rustfmt / tests / target / match-nowrap-trailing-comma.rs
diff --git a/src/tools/rustfmt/tests/target/match-nowrap-trailing-comma.rs b/src/tools/rustfmt/tests/target/match-nowrap-trailing-comma.rs
new file mode 100644 (file)
index 0000000..19ef214
--- /dev/null
@@ -0,0 +1,17 @@
+// rustfmt-match_arm_blocks: false
+// rustfmt-match_block_trailing_comma: true
+// Match expressions, no unwrapping of block arms or wrapping of multiline
+// expressions.
+
+fn foo() {
+    match x {
+        a => {
+            "line1";
+            "line2"
+        },
+        b => (
+            aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
+            bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
+        ),
+    }
+}