11error: this boolean expression can be simplified
2- --> $DIR/match_bool.rs:29 :11
2+ --> $DIR/match_bool.rs:31 :11
33 |
44LL | match test && test {
55 | ^^^^^^^^^^^^ help: try: `test`
66 |
77 = note: `-D clippy::nonminimal-bool` implied by `-D warnings`
88
99error: you seem to be trying to match on a boolean expression
10- --> $DIR/match_bool.rs:4 :5
10+ --> $DIR/match_bool.rs:6 :5
1111 |
1212LL | / match test {
1313LL | | true => 0,
1414LL | | false => 42,
1515LL | | };
1616 | |_____^ help: consider using an `if`/`else` expression: `if test { 0 } else { 42 }`
1717 |
18- = note: `-D clippy::match-bool` implied by `-D warnings`
18+ note: the lint level is defined here
19+ --> $DIR/match_bool.rs:1:9
20+ |
21+ LL | #![deny(clippy::match_bool)]
22+ | ^^^^^^^^^^^^^^^^^^
1923
2024error: you seem to be trying to match on a boolean expression
21- --> $DIR/match_bool.rs:10 :5
25+ --> $DIR/match_bool.rs:12 :5
2226 |
2327LL | / match option == 1 {
2428LL | | true => 1,
@@ -27,7 +31,7 @@ LL | | };
2731 | |_____^ help: consider using an `if`/`else` expression: `if option == 1 { 1 } else { 0 }`
2832
2933error: you seem to be trying to match on a boolean expression
30- --> $DIR/match_bool.rs:15 :5
34+ --> $DIR/match_bool.rs:17 :5
3135 |
3236LL | / match test {
3337LL | | true => (),
@@ -45,7 +49,7 @@ LL | };
4549 |
4650
4751error: you seem to be trying to match on a boolean expression
48- --> $DIR/match_bool.rs:22 :5
52+ --> $DIR/match_bool.rs:24 :5
4953 |
5054LL | / match test {
5155LL | | false => {
@@ -63,7 +67,7 @@ LL | };
6367 |
6468
6569error: you seem to be trying to match on a boolean expression
66- --> $DIR/match_bool.rs:29 :5
70+ --> $DIR/match_bool.rs:31 :5
6771 |
6872LL | / match test && test {
6973LL | | false => {
@@ -81,15 +85,15 @@ LL | };
8185 |
8286
8387error: equal expressions as operands to `&&`
84- --> $DIR/match_bool.rs:29 :11
88+ --> $DIR/match_bool.rs:31 :11
8589 |
8690LL | match test && test {
8791 | ^^^^^^^^^^^^
8892 |
8993 = note: `#[deny(clippy::eq_op)]` on by default
9094
9195error: you seem to be trying to match on a boolean expression
92- --> $DIR/match_bool.rs:36 :5
96+ --> $DIR/match_bool.rs:38 :5
9397 |
9498LL | / match test {
9599LL | | false => {
0 commit comments