1 error: match expression looks like `matches!` macro
2 --> $DIR/match_expr_like_matches_macro.rs:10:14
4 LL | let _y = match x {
6 LL | | Some(0) => true,
9 | |_____^ help: try this: `matches!(x, Some(0))`
11 = note: `-D clippy::match-like-matches-macro` implied by `-D warnings`
13 error: match expression looks like `matches!` macro
14 --> $DIR/match_expr_like_matches_macro.rs:16:14
16 LL | let _w = match x {
18 LL | | Some(_) => true,
21 | |_____^ help: try this: `matches!(x, Some(_))`
23 error: redundant pattern matching, consider using `is_none()`
24 --> $DIR/match_expr_like_matches_macro.rs:22:14
26 LL | let _z = match x {
28 LL | | Some(_) => false,
31 | |_____^ help: try this: `x.is_none()`
33 = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
35 error: match expression looks like `matches!` macro
36 --> $DIR/match_expr_like_matches_macro.rs:28:15
38 LL | let _zz = match x {
40 LL | | Some(r) if r == 0 => false,
43 | |_____^ help: try this: `!matches!(x, Some(r) if r == 0)`
45 error: if let .. else expression looks like `matches!` macro
46 --> $DIR/match_expr_like_matches_macro.rs:34:16
48 LL | let _zzz = if let Some(5) = x { true } else { false };
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `matches!(x, Some(5))`
51 error: match expression looks like `matches!` macro
52 --> $DIR/match_expr_like_matches_macro.rs:58:20
54 LL | let _ans = match x {
55 | ____________________^
56 LL | | E::A(_) => true,
57 LL | | E::B(_) => true,
60 | |_________^ help: try this: `matches!(x, E::A(_) | E::B(_))`
62 error: match expression looks like `matches!` macro
63 --> $DIR/match_expr_like_matches_macro.rs:66:20
65 LL | let _ans = match x {
66 | ____________________^
67 LL | | E::B(_) => false,
71 | |_________^ help: try this: `!matches!(x, E::B(_) | E::C)`
73 error: match expression looks like `matches!` macro
74 --> $DIR/match_expr_like_matches_macro.rs:126:18
76 LL | let _z = match &z {
78 LL | | Some(3) => true,
81 | |_________^ help: try this: `matches!(z, Some(3))`
83 error: match expression looks like `matches!` macro
84 --> $DIR/match_expr_like_matches_macro.rs:135:18
86 LL | let _z = match &z {
88 LL | | Some(3) => true,
91 | |_________^ help: try this: `matches!(&z, Some(3))`
93 error: match expression looks like `matches!` macro
94 --> $DIR/match_expr_like_matches_macro.rs:152:21
96 LL | let _ = match &z {
97 | _____________________^
98 LL | | AnEnum::X => true,
101 | |_____________^ help: try this: `matches!(&z, AnEnum::X)`
103 error: match expression looks like `matches!` macro
104 --> $DIR/match_expr_like_matches_macro.rs:166:20
106 LL | let _res = match &val {
107 | ____________________^
108 LL | | &Some(ref _a) => true,
111 | |_________^ help: try this: `matches!(&val, &Some(ref _a))`
113 error: match expression looks like `matches!` macro
114 --> $DIR/match_expr_like_matches_macro.rs:178:20
116 LL | let _res = match &val {
117 | ____________________^
118 LL | | &Some(ref _a) => true,
121 | |_________^ help: try this: `matches!(&val, &Some(ref _a))`
123 error: aborting due to 12 previous errors