mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
75 lines
2.3 KiB
Plaintext
75 lines
2.3 KiB
Plaintext
error: this boolean expression can be simplified
|
|
--> $DIR/match_bool.rs:35:11
|
|
|
|
|
35 | match test && test {
|
|
| ^^^^^^^^^^^^ help: try: `test`
|
|
|
|
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
|
--> $DIR/match_bool.rs:14:5
|
|
|
|
|
14 | / match test {
|
|
15 | | true => 0,
|
|
16 | | false => 42,
|
|
17 | | };
|
|
| |_____^ help: consider using an if/else expression: `if test { 0 } else { 42 }`
|
|
|
|
|
= note: `-D clippy::match-bool` implied by `-D warnings`
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
|
--> $DIR/match_bool.rs:20:5
|
|
|
|
|
20 | / match option == 1 {
|
|
21 | | true => 1,
|
|
22 | | false => 0,
|
|
23 | | };
|
|
| |_____^ 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
|
|
--> $DIR/match_bool.rs:25:5
|
|
|
|
|
25 | / match test {
|
|
26 | | true => (),
|
|
27 | | false => { println!("Noooo!"); }
|
|
28 | | };
|
|
| |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
|
--> $DIR/match_bool.rs:30:5
|
|
|
|
|
30 | / match test {
|
|
31 | | false => { println!("Noooo!"); }
|
|
32 | | _ => (),
|
|
33 | | };
|
|
| |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
|
--> $DIR/match_bool.rs:35:5
|
|
|
|
|
35 | / match test && test {
|
|
36 | | false => { println!("Noooo!"); }
|
|
37 | | _ => (),
|
|
38 | | };
|
|
| |_____^ help: consider using an if/else expression: `if !(test && test) { println!("Noooo!"); }`
|
|
|
|
error: equal expressions as operands to `&&`
|
|
--> $DIR/match_bool.rs:35:11
|
|
|
|
|
35 | match test && test {
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= note: #[deny(clippy::eq_op)] on by default
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
|
--> $DIR/match_bool.rs:40:5
|
|
|
|
|
40 | / match test {
|
|
41 | | false => { println!("Noooo!"); }
|
|
42 | | true => { println!("Yes!"); }
|
|
43 | | };
|
|
| |_____^ help: consider using an if/else expression: `if test { println!("Yes!"); } else { println!("Noooo!"); }`
|
|
|
|
error: aborting due to 8 previous errors
|
|
|