about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorSeiichi Uchida <seuchida@gmail.com>2019-08-06 11:09:45 +0900
committerGitHub <noreply@github.com>2019-08-06 11:09:45 +0900
commitc0cb5eb5358c38c07c0b57217e691bc3ebbb5e85 (patch)
tree114e83a8516b41c5aef4344ca131149e41e427c3 /tests
parent127de250417eac37c71f0383472d920e553ff814 (diff)
Fix broken tuple pattern (#3729)
Diffstat (limited to 'tests')
-rw-r--r--tests/source/pattern.rs7
-rw-r--r--tests/target/issue-1021.rs2
-rw-r--r--tests/target/pattern.rs5
3 files changed, 13 insertions, 1 deletions
diff --git a/tests/source/pattern.rs b/tests/source/pattern.rs
index fc3b1455e0d..f06d03cadf2 100644
--- a/tests/source/pattern.rs
+++ b/tests/source/pattern.rs
@@ -81,3 +81,10 @@ fn slice_patterns() {
         _ => {}
     }
 }
+
+fn issue3728() {
+    let foo = |
+    (c,)
+        | c;
+    foo((1,));
+}
diff --git a/tests/target/issue-1021.rs b/tests/target/issue-1021.rs
index 94911d1f8ee..ba1029d4e61 100644
--- a/tests/target/issue-1021.rs
+++ b/tests/target/issue-1021.rs
@@ -15,7 +15,7 @@ fn main() {
         (true, ..) => (),
         (.., true) => (),
         (..) => (),
-        (_) => (),
+        (_,) => (),
         (/* .. */ ..) => (),
         (/* .. */ .., true) => (),
     }
diff --git a/tests/target/pattern.rs b/tests/target/pattern.rs
index d8a96d64920..576018ac623 100644
--- a/tests/target/pattern.rs
+++ b/tests/target/pattern.rs
@@ -91,3 +91,8 @@ fn slice_patterns() {
         _ => {}
     }
 }
+
+fn issue3728() {
+    let foo = |(c,)| c;
+    foo((1,));
+}