diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-14308.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-14308.rs b/src/test/ui/issues/issue-14308.rs new file mode 100644 index 000000000..e067bcdf3 --- /dev/null +++ b/src/test/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); +} |