]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/rustfmt/tests/target/issue-2554.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / rustfmt / tests / target / issue-2554.rs
diff --git a/src/tools/rustfmt/tests/target/issue-2554.rs b/src/tools/rustfmt/tests/target/issue-2554.rs
new file mode 100644 (file)
index 0000000..d5f0563
--- /dev/null
@@ -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(_) => (),
+    }
+}