]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/crashes/cc_seme.rs
Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup
[rust.git] / src / tools / clippy / tests / ui / crashes / cc_seme.rs
1 #[allow(dead_code)]
2
3 /// Test for https://github.com/rust-lang/rust-clippy/issues/478
4
5 enum Baz {
6     One,
7     Two,
8 }
9
10 struct Test {
11     t: Option<usize>,
12     b: Baz,
13 }
14
15 fn main() {}
16
17 pub fn foo() {
18     use Baz::*;
19     let x = Test { t: Some(0), b: One };
20
21     match x {
22         Test { t: Some(_), b: One } => unreachable!(),
23         Test { t: Some(42), b: Two } => unreachable!(),
24         Test { t: None, .. } => unreachable!(),
25         Test { .. } => unreachable!(),
26     }
27 }