]> git.lizzy.rs Git - rust.git/blob - tests/cc_seme.rs
don't lint similar_names inside #[test] functions
[rust.git] / tests / cc_seme.rs
1 #![feature(plugin)]
2 #![plugin(clippy)]
3
4 #[allow(dead_code)]
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     use Baz::*;
17     let x = Test { t: Some(0), b: One };
18
19     match x {
20         Test { t: Some(_), b: One } => unreachable!(),
21         Test { t: Some(42), b: Two } => unreachable!(),
22         Test { t: None, .. } => unreachable!(),
23         Test { .. } => unreachable!(),
24     }
25 }