summary refs log tree commit diff
path: root/src/test/compile-fail/issue-2111.rs
blob: 957d84eaa84fba0d858659d022ce8e1669f1b683 (plain)
1
2
3
4
5
6
7
8
9
10
11
fn foo(a: option<uint>, b: option<uint>) {
  alt (a,b) { //~ ERROR: non-exhaustive patterns: none not covered
    (some(a), some(b)) if a == b { }
    (some(_), none) |
    (none, some(_)) { }
  }
}

fn main() {
  foo(none, none);
}