rust/clippy_lints
bors 22b319606f Auto merge of #10753 - disco07:master, r=xFrednet
redundant_pattern_matching

This PR try to solve this issue https://github.com/rust-lang/rust-clippy/pull/10726,
but it enter in conflict with another test.

changelog: none

Try to test this:
```
let _w = match x {
     Some(_) => true,
     _ => false,
};
```

this happen:
```
 error: match expression looks like `matches!` macro
   --> $DIR/match_expr_like_matches_macro.rs:21:14
    |
 LL |       let _w = match x {
    |  ______________^
 LL | |         Some(_) => true,
 LL | |         _ => false,
 LL | |     };
    | |_____^ help: try this: `matches!(x, Some(_))`

+error: redundant pattern matching, consider using `is_some()`
+  --> $DIR/match_expr_like_matches_macro.rs:21:14
+   |
+LL |       let _w = match x {
+   |  ______________^
+LL | |         Some(_) => true,
+LL | |         _ => false,
+LL | |     };
+   | |_____^ help: try this: `x.is_some()`
+   |
+   = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
+
```
I need some help to fix this. Thanks
2023-05-18 09:52:27 +00:00
..
src Auto merge of #10753 - disco07:master, r=xFrednet 2023-05-18 09:52:27 +00:00
Cargo.toml Auto merge of #10682 - J-ZhengLi:issue10680, r=dswij 2023-05-18 01:46:01 +00:00
README.md

This crate contains Clippy lints. For the main crate, check GitHub.