]> git.lizzy.rs Git - rust.git/blob - tests/ui/match_bool.stderr
Auto merge of #3635 - matthiaskrgr:revert_random_state_3603, r=xfix
[rust.git] / tests / ui / match_bool.stderr
1 error: this boolean expression can be simplified
2   --> $DIR/match_bool.rs:38:11
3    |
4 LL |     match test && test {
5    |           ^^^^^^^^^^^^ help: try: `test`
6    |
7    = note: `-D clippy::nonminimal-bool` implied by `-D warnings`
8
9 error: you seem to be trying to match on a boolean expression
10   --> $DIR/match_bool.rs:13:5
11    |
12 LL | /     match test {
13 LL | |         true => 0,
14 LL | |         false => 42,
15 LL | |     };
16    | |_____^ help: consider using an if/else expression: `if test { 0 } else { 42 }`
17    |
18    = note: `-D clippy::match-bool` implied by `-D warnings`
19
20 error: you seem to be trying to match on a boolean expression
21   --> $DIR/match_bool.rs:19:5
22    |
23 LL | /     match option == 1 {
24 LL | |         true => 1,
25 LL | |         false => 0,
26 LL | |     };
27    | |_____^ help: consider using an if/else expression: `if option == 1 { 1 } else { 0 }`
28
29 error: you seem to be trying to match on a boolean expression
30   --> $DIR/match_bool.rs:24:5
31    |
32 LL | /     match test {
33 LL | |         true => (),
34 LL | |         false => {
35 LL | |             println!("Noooo!");
36 LL | |         },
37 LL | |     };
38    | |_____^
39 help: consider using an if/else expression
40    |
41 LL |     if !test {
42 LL |     println!("Noooo!");
43 LL | };
44    |
45
46 error: you seem to be trying to match on a boolean expression
47   --> $DIR/match_bool.rs:31:5
48    |
49 LL | /     match test {
50 LL | |         false => {
51 LL | |             println!("Noooo!");
52 LL | |         },
53 LL | |         _ => (),
54 LL | |     };
55    | |_____^
56 help: consider using an if/else expression
57    |
58 LL |     if !test {
59 LL |     println!("Noooo!");
60 LL | };
61    |
62
63 error: you seem to be trying to match on a boolean expression
64   --> $DIR/match_bool.rs:38:5
65    |
66 LL | /     match test && test {
67 LL | |         false => {
68 LL | |             println!("Noooo!");
69 LL | |         },
70 LL | |         _ => (),
71 LL | |     };
72    | |_____^
73 help: consider using an if/else expression
74    |
75 LL |     if !(test && test) {
76 LL |     println!("Noooo!");
77 LL | };
78    |
79
80 error: equal expressions as operands to `&&`
81   --> $DIR/match_bool.rs:38:11
82    |
83 LL |     match test && test {
84    |           ^^^^^^^^^^^^
85    |
86    = note: #[deny(clippy::eq_op)] on by default
87
88 error: you seem to be trying to match on a boolean expression
89   --> $DIR/match_bool.rs:45:5
90    |
91 LL | /     match test {
92 LL | |         false => {
93 LL | |             println!("Noooo!");
94 LL | |         },
95 ...  |
96 LL | |         },
97 LL | |     };
98    | |_____^
99 help: consider using an if/else expression
100    |
101 LL |     if test {
102 LL |     println!("Yes!");
103 LL | } else {
104 LL |     println!("Noooo!");
105 LL | };
106    |
107
108 error: aborting due to 8 previous errors
109