about summary refs log tree commit diff
path: root/src/tools/rustfmt/tests/source/pattern.rs
diff options
context:
space:
mode:
authorOli Scherer <github333195615777966@oli-obk.de>2025-01-08 08:53:10 +0000
committerOli Scherer <github333195615777966@oli-obk.de>2025-01-10 08:28:46 +0000
commitc9946376cf5a49e12e02f724c23b10db3a17c24e (patch)
tree4fd45849224f5f54a7a9739866eed6332a511a70 /src/tools/rustfmt/tests/source/pattern.rs
parent65d7296fc9868af121adb5e07358a3815a80a7a1 (diff)
downloadrust-c9946376cf5a49e12e02f724c23b10db3a17c24e.tar.gz
rust-c9946376cf5a49e12e02f724c23b10db3a17c24e.zip
Only treat plain literal patterns as short
Diffstat (limited to 'src/tools/rustfmt/tests/source/pattern.rs')
-rw-r--r--src/tools/rustfmt/tests/source/pattern.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/pattern.rs b/src/tools/rustfmt/tests/source/pattern.rs
index f06d03cadf2..ed6ad690fa9 100644
--- a/src/tools/rustfmt/tests/source/pattern.rs
+++ b/src/tools/rustfmt/tests/source/pattern.rs
@@ -88,3 +88,13 @@ fn issue3728() {
         | c;
     foo((1,));
 }
+
+fn literals() {
+    match 42 {
+        const { 1 + 2 } | 4
+        | 6 => {}
+        10 | 11 | 12
+        | 13 | 14 => {}
+        _ => {}
+    }
+}
\ No newline at end of file