From be92ac3567e4a808cc08cd909efa5663fff2f8ea Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 8 Jan 2025 08:53:10 +0000 Subject: Only treat plain literal patterns as short --- src/tools/rustfmt/tests/source/pattern.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/tools/rustfmt/tests/source') 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 -- cgit 1.4.1-3-g733a5