]> git.lizzy.rs Git - rust.git/blob - tests/ui/match_bool.stderr
Adapt the *.stderr files of the ui-tests to the tool_lints
[rust.git] / tests / ui / match_bool.stderr
1 error: this boolean expression can be simplified
2   --> $DIR/match_bool.rs:25:11
3    |
4 25 |     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:4:5
11   |
12 4 | /     match test {
13 5 | |         true => 0,
14 6 | |         false => 42,
15 7 | |     };
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:10:5
22    |
23 10 | /     match option == 1 {
24 11 | |         true => 1,
25 12 | |         false => 0,
26 13 | |     };
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:15:5
31    |
32 15 | /     match test {
33 16 | |         true => (),
34 17 | |         false => { println!("Noooo!"); }
35 18 | |     };
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:20:5
40    |
41 20 | /     match test {
42 21 | |         false => { println!("Noooo!"); }
43 22 | |         _ => (),
44 23 | |     };
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:25:5
49    |
50 25 | /     match test && test {
51 26 | |         false => { println!("Noooo!"); }
52 27 | |         _ => (),
53 28 | |     };
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:25:11
58    |
59 25 |     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:30:5
66    |
67 30 | /     match test {
68 31 | |         false => { println!("Noooo!"); }
69 32 | |         true => { println!("Yes!"); }
70 33 | |     };
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