summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-2554.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/target/issue-2554.rs')
-rw-r--r--src/tools/rustfmt/tests/target/issue-2554.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/issue-2554.rs b/src/tools/rustfmt/tests/target/issue-2554.rs
new file mode 100644
index 000000000..d5f0563a6
--- /dev/null
+++ b/src/tools/rustfmt/tests/target/issue-2554.rs
@@ -0,0 +1,13 @@
+// #2554
+// Do not add the beginning vert to the first match arm's pattern.
+
+fn main() {
+ match foo(|_| {
+ bar(|_| {
+ //
+ })
+ }) {
+ Ok(()) => (),
+ Err(_) => (),
+ }
+}