summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-14308.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-14308.rs')
-rw-r--r--tests/ui/issues/issue-14308.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-14308.rs b/tests/ui/issues/issue-14308.rs
new file mode 100644
index 000000000..e067bcdf3
--- /dev/null
+++ b/tests/ui/issues/issue-14308.rs
@@ -0,0 +1,15 @@
+// run-pass
+
+struct A(isize);
+
+fn main() {
+ let x = match A(3) {
+ A(..) => 1
+ };
+ assert_eq!(x, 1);
+ let x = match A(4) {
+ A(1) => 1,
+ A(..) => 2
+ };
+ assert_eq!(x, 2);
+}