2018-04-07 08:23:27 +00:00
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/match_bool.rs:29:11
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | match test && test {
|
2018-04-07 08:23:27 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try: `test`
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/match_bool.rs:4:5
|
2018-10-06 16:18:06 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / match test {
|
|
|
|
LL | | true => 0,
|
|
|
|
LL | | false => 42,
|
|
|
|
LL | | };
|
2018-10-06 16:18:06 +00:00
|
|
|
| |_____^ help: consider using an if/else expression: `if test { 0 } else { 42 }`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::match-bool` implied by `-D warnings`
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/match_bool.rs:10:5
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / match option == 1 {
|
|
|
|
LL | | true => 1,
|
|
|
|
LL | | false => 0,
|
|
|
|
LL | | };
|
2018-04-07 08:23:27 +00:00
|
|
|
| |_____^ help: consider using an if/else expression: `if option == 1 { 1 } else { 0 }`
|
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/match_bool.rs:15:5
|
2018-12-10 05:27:19 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / match test {
|
|
|
|
LL | | true => (),
|
|
|
|
LL | | false => {
|
|
|
|
LL | | println!("Noooo!");
|
|
|
|
LL | | },
|
|
|
|
LL | | };
|
2018-12-10 05:27:19 +00:00
|
|
|
| |_____^
|
|
|
|
help: consider using an if/else expression
|
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if !test {
|
|
|
|
LL | println!("Noooo!");
|
|
|
|
LL | };
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/match_bool.rs:22:5
|
2018-12-10 05:27:19 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / match test {
|
|
|
|
LL | | false => {
|
|
|
|
LL | | println!("Noooo!");
|
|
|
|
LL | | },
|
|
|
|
LL | | _ => (),
|
|
|
|
LL | | };
|
2018-12-10 05:27:19 +00:00
|
|
|
| |_____^
|
|
|
|
help: consider using an if/else expression
|
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if !test {
|
|
|
|
LL | println!("Noooo!");
|
|
|
|
LL | };
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/match_bool.rs:29:5
|
2018-12-10 05:27:19 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / match test && test {
|
|
|
|
LL | | false => {
|
|
|
|
LL | | println!("Noooo!");
|
|
|
|
LL | | },
|
|
|
|
LL | | _ => (),
|
|
|
|
LL | | };
|
2018-12-10 05:27:19 +00:00
|
|
|
| |_____^
|
|
|
|
help: consider using an if/else expression
|
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if !(test && test) {
|
|
|
|
LL | println!("Noooo!");
|
|
|
|
LL | };
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/match_bool.rs:29:11
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | match test && test {
|
2018-04-07 08:23:27 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
2019-07-18 22:35:32 +00:00
|
|
|
= note: `#[deny(clippy::eq_op)]` on by default
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/match_bool.rs:36:5
|
2018-12-10 05:27:19 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / match test {
|
|
|
|
LL | | false => {
|
|
|
|
LL | | println!("Noooo!");
|
|
|
|
LL | | },
|
2018-12-10 05:27:19 +00:00
|
|
|
... |
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | | },
|
|
|
|
LL | | };
|
2018-12-10 05:27:19 +00:00
|
|
|
| |_____^
|
|
|
|
help: consider using an if/else expression
|
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if test {
|
|
|
|
LL | println!("Yes!");
|
|
|
|
LL | } else {
|
|
|
|
LL | println!("Noooo!");
|
|
|
|
LL | };
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
|
|
|
|