]> git.lizzy.rs Git - rust.git/blob - tests/ui/match_bool.stderr
Merge branch 'master' into rustfmt_tests
[rust.git] / tests / ui / match_bool.stderr
1 error: this boolean expression can be simplified
2   --> $DIR/match_bool.rs:38:11
3    |
4 38 |     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 13 | /     match test {
13 14 | |         true => 0,
14 15 | |         false => 42,
15 16 | |     };
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 19 | /     match option == 1 {
24 20 | |         true => 1,
25 21 | |         false => 0,
26 22 | |     };
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 24 | /     match test {
33 25 | |         true => (),
34 26 | |         false => {
35 27 | |             println!("Noooo!");
36 28 | |         },
37 29 | |     };
38    | |_____^
39 help: consider using an if/else expression
40    |
41 24 |     if !test {
42 25 |     println!("Noooo!");
43 26 | };
44    |
45
46 error: you seem to be trying to match on a boolean expression
47   --> $DIR/match_bool.rs:31:5
48    |
49 31 | /     match test {
50 32 | |         false => {
51 33 | |             println!("Noooo!");
52 34 | |         },
53 35 | |         _ => (),
54 36 | |     };
55    | |_____^
56 help: consider using an if/else expression
57    |
58 31 |     if !test {
59 32 |     println!("Noooo!");
60 33 | };
61    |
62
63 error: you seem to be trying to match on a boolean expression
64   --> $DIR/match_bool.rs:38:5
65    |
66 38 | /     match test && test {
67 39 | |         false => {
68 40 | |             println!("Noooo!");
69 41 | |         },
70 42 | |         _ => (),
71 43 | |     };
72    | |_____^
73 help: consider using an if/else expression
74    |
75 38 |     if !(test && test) {
76 39 |     println!("Noooo!");
77 40 | };
78    |
79
80 error: equal expressions as operands to `&&`
81   --> $DIR/match_bool.rs:38:11
82    |
83 38 |     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 45 | /     match test {
92 46 | |         false => {
93 47 | |             println!("Noooo!");
94 48 | |         },
95 ...  |
96 51 | |         },
97 52 | |     };
98    | |_____^
99 help: consider using an if/else expression
100    |
101 45 |     if test {
102 46 |     println!("Yes!");
103 47 | } else {
104 48 |     println!("Noooo!");
105 49 | };
106    |
107
108 error: aborting due to 8 previous errors
109