]> git.lizzy.rs Git - rust.git/blob - tests/ui/match_bool.stderr
Add license header to Rust files
[rust.git] / tests / ui / match_bool.stderr
1 error: this boolean expression can be simplified
2   --> $DIR/match_bool.rs:35:11
3    |
4 35 |     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:14:5
11    |
12 14 | /     match test {
13 15 | |         true => 0,
14 16 | |         false => 42,
15 17 | |     };
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:20:5
22    |
23 20 | /     match option == 1 {
24 21 | |         true => 1,
25 22 | |         false => 0,
26 23 | |     };
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:25:5
31    |
32 25 | /     match test {
33 26 | |         true => (),
34 27 | |         false => { println!("Noooo!"); }
35 28 | |     };
36    | |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
37
38 error: you seem to be trying to match on a boolean expression
39   --> $DIR/match_bool.rs:30:5
40    |
41 30 | /     match test {
42 31 | |         false => { println!("Noooo!"); }
43 32 | |         _ => (),
44 33 | |     };
45    | |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
46
47 error: you seem to be trying to match on a boolean expression
48   --> $DIR/match_bool.rs:35:5
49    |
50 35 | /     match test && test {
51 36 | |         false => { println!("Noooo!"); }
52 37 | |         _ => (),
53 38 | |     };
54    | |_____^ help: consider using an if/else expression: `if !(test && test) { println!("Noooo!"); }`
55
56 error: equal expressions as operands to `&&`
57   --> $DIR/match_bool.rs:35:11
58    |
59 35 |     match test && test {
60    |           ^^^^^^^^^^^^
61    |
62    = note: #[deny(clippy::eq_op)] on by default
63
64 error: you seem to be trying to match on a boolean expression
65   --> $DIR/match_bool.rs:40:5
66    |
67 40 | /     match test {
68 41 | |         false => { println!("Noooo!"); }
69 42 | |         true => { println!("Yes!"); }
70 43 | |     };
71    | |_____^ help: consider using an if/else expression: `if test { println!("Yes!"); } else { println!("Noooo!"); }`
72
73 error: aborting due to 8 previous errors
74