1 #![feature(tool_lints)]
3 #![warn(clippy::single_match)]
12 Some(y) => { println!("{:?}", y); }
18 (2...3, 7...9) => dummy(),
22 // Not linted (pattern guards used)
24 Some(y) if y == 0 => println!("{:?}", y),
28 // Not linted (no block with statements in the single arm)
30 (2...3, 7...9) => println!("{:?}", z),
31 _ => println!("nope"),
35 enum Foo { Bar, Baz(u8) }
39 fn single_match_know_enum() {
41 let y : Result<_, i8> = Ok(1i8);
53 let c = Cow::Borrowed("");
56 Cow::Borrowed(..) => dummy(),
63 Bar => println!("42"),
68 Baz(_) => println!("42"),