diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/rustfmt/tests/target/pattern-condense-wildcards.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/pattern-condense-wildcards.rs b/src/tools/rustfmt/tests/target/pattern-condense-wildcards.rs new file mode 100644 index 000000000..a85a16004 --- /dev/null +++ b/src/tools/rustfmt/tests/target/pattern-condense-wildcards.rs @@ -0,0 +1,12 @@ +// rustfmt-normalize_comments: true +// rustfmt-condense_wildcard_suffixes: true + +fn main() { + match x { + Butt(..) => "hah", + Tup(_) => "nah", + Quad(_, _, x, _) => " also no rewrite", + Quad(x, ..) => "condense me pls", + Weird(x, _, _, /* don't condense before */ ..) => "pls work", + } +} |