]> git.lizzy.rs Git - rust.git/blob - tests/run-pass/cc_seme.rs
Adapt run-pass tests to the tool_lints
[rust.git] / tests / run-pass / cc_seme.rs
1 #[allow(dead_code)]
2 enum Baz {
3     One,
4     Two,
5 }
6
7 struct Test {
8     t: Option<usize>,
9     b: Baz,
10 }
11
12 fn main() { }
13
14 pub fn foo() {
15     use Baz::*;
16     let x = Test { t: Some(0), b: One };
17
18     match x {
19         Test { t: Some(_), b: One } => unreachable!(),
20         Test {
21             t: Some(42),
22             b: Two,
23         } => unreachable!(),
24         Test { t: None, .. } => unreachable!(),
25         Test { .. } => unreachable!(),
26     }
27 }