summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-15896.rs
blob: d3153b516e64de9f15ad88230402f43b0d96fc15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Regression test for #15896. It used to ICE rustc.

fn main() {
    enum R { REB(()) }
    struct Tau { t: usize }
    enum E { B(R, Tau) }

    let e = E::B(R::REB(()), Tau { t: 3 });
    let u = match e {
        E::B(
          Tau{t: x},
          //~^ ERROR mismatched types
          _) => x,
    };
}