summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/match-nowrap-trailing-comma.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/target/match-nowrap-trailing-comma.rs')
-rw-r--r--src/tools/rustfmt/tests/target/match-nowrap-trailing-comma.rs17
1 files changed, 17 insertions, 0 deletions
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
index 000000000..19ef21448
--- /dev/null
+++ b/src/tools/rustfmt/tests/target/match-nowrap-trailing-comma.rs
@@ -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,
+ ),
+ }
+}