9 match x { //~ ERROR you seem to be trying to use match
18 Some(y) => println!("{:?}", y),
22 match z { //~ ERROR you seem to be trying to use match
24 (2...3, 7...9) => println!("{:?}", z),
28 // Not linted (pattern guards used)
30 Some(y) if y == 0 => println!("{:?}", y),
34 // Not linted (content in the else)
36 (2...3, 7...9) => println!("{:?}", z),
37 _ => println!("nope"),
42 let test: bool = true;
44 match test { //~ ERROR you seem to be trying to match on a boolean expression
50 match option == 1 { //~ ERROR you seem to be trying to match on a boolean expression
55 match test { //~ ERROR you seem to be trying to match on a boolean expression
57 false => { println!("Noooo!"); }
60 match test { //~ ERROR you seem to be trying to match on a boolean expression
61 false => { println!("Noooo!"); }
65 match test { //~ ERROR you seem to be trying to match on a boolean expression
66 false => { println!("Noooo!"); }
67 true => { println!("Yes!"); }
81 match v { //~ERROR dereference the expression: `match *v { ...`
82 &Some(v) => println!("{:?}", v),
83 &None => println!("none"),
85 match v { // this doesn't trigger, we have a different pattern
86 &Some(v) => println!("some"),
87 other => println!("other"),
91 match tup { //~ERROR dereference the expression: `match *tup { ...`
92 &(v, 1) => println!("{}", v),
93 _ => println!("none"),
95 // special case: using & both in expr and pats
97 match &w { //~ERROR use `match w { ...`
98 &Some(v) => println!("{:?}", v),
99 &None => println!("none"),
101 // false positive: only wildcard pattern
104 _ => println!("none"),
108 if let &None = a { //~ERROR dereference the expression: `if let ... = *a {`
113 if let &None = &b { //~ERROR use `if let ... = b {`