about summary refs log tree commit diff
path: root/tests/ui/pattern/struct-wildcard-pattern-14308.rs
blob: c1fdf424b8c440ef059aa9b35d71c15960c8cb38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Regression test for https://github.com/rust-lang/rust/issues/14308

//@ 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);
}