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: aborting due to 5 previous errors