aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-fail/non-exhaustive-match.rs
blob: 0600f0c5d4c2987aa2f2a6dcdd5d65bc6215e5e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// xfail-stage0
// xfail-stage1
// xfail-stage2
// -*- rust -*-

// error-pattern:non-exhaustive match failure

tag t {
  a;
  b;
}

fn main() {
  auto x = a;
  alt (x) {
    case (b) { }
  }
}