]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/booleans.stderr
Fix the test suite after cargo update
[rust.git] / clippy_tests / examples / booleans.stderr
1 error: this boolean expression contains a logic bug
2   --> booleans.rs:12:13
3    |
4 12 |     let _ = a && b || a;
5    |             ^^^^^^^^^^^ help: it would look like the following `a`
6    |
7    = note: `-D logic-bug` implied by `-D warnings`
8 help: this expression can be optimized out by applying boolean operations to the outer expression
9   --> booleans.rs:12:18
10    |
11 12 |     let _ = a && b || a;
12    |                  ^
13
14 error: this boolean expression can be simplified
15   --> booleans.rs:14:13
16    |
17 14 |     let _ = !true;
18    |             ^^^^^ help: try `false`
19    |
20    = note: `-D nonminimal-bool` implied by `-D warnings`
21
22 error: this boolean expression can be simplified
23   --> booleans.rs:15:13
24    |
25 15 |     let _ = !false;
26    |             ^^^^^^ help: try `true`
27    |
28    = note: `-D nonminimal-bool` implied by `-D warnings`
29
30 error: this boolean expression can be simplified
31   --> booleans.rs:16:13
32    |
33 16 |     let _ = !!a;
34    |             ^^^ help: try `a`
35    |
36    = note: `-D nonminimal-bool` implied by `-D warnings`
37
38 error: this boolean expression contains a logic bug
39   --> booleans.rs:17:13
40    |
41 17 |     let _ = false && a;
42    |             ^^^^^^^^^^ help: it would look like the following `false`
43    |
44    = note: `-D logic-bug` implied by `-D warnings`
45 help: this expression can be optimized out by applying boolean operations to the outer expression
46   --> booleans.rs:17:22
47    |
48 17 |     let _ = false && a;
49    |                      ^
50
51 error: this boolean expression can be simplified
52   --> booleans.rs:18:13
53    |
54 18 |     let _ = false || a;
55    |             ^^^^^^^^^^ help: try `a`
56    |
57    = note: `-D nonminimal-bool` implied by `-D warnings`
58
59 error: this boolean expression can be simplified
60   --> booleans.rs:23:13
61    |
62 23 |     let _ = !(!a && b);
63    |             ^^^^^^^^^^ help: try `!b || a`
64    |
65    = note: `-D nonminimal-bool` implied by `-D warnings`
66
67 error: this boolean expression contains a logic bug
68   --> booleans.rs:33:13
69    |
70 33 |     let _ = a == b && a != b;
71    |             ^^^^^^^^^^^^^^^^ help: it would look like the following `false`
72    |
73    = note: `-D logic-bug` implied by `-D warnings`
74 help: this expression can be optimized out by applying boolean operations to the outer expression
75   --> booleans.rs:33:13
76    |
77 33 |     let _ = a == b && a != b;
78    |             ^^^^^^
79
80 error: this boolean expression can be simplified
81   --> booleans.rs:34:13
82    |
83 34 |     let _ = a == b && c == 5 && a == b;
84    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
85    |
86    = note: `-D nonminimal-bool` implied by `-D warnings`
87 help: try
88    |     let _ = a == b && c == 5;
89    |     let _ = !(c != 5 || a != b);
90
91 error: this boolean expression can be simplified
92   --> booleans.rs:35:13
93    |
94 35 |     let _ = a == b && c == 5 && b == a;
95    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
96    |
97    = note: `-D nonminimal-bool` implied by `-D warnings`
98 help: try
99    |     let _ = a == b && c == 5;
100    |     let _ = !(c != 5 || a != b);
101
102 error: this boolean expression contains a logic bug
103   --> booleans.rs:36:13
104    |
105 36 |     let _ = a < b && a >= b;
106    |             ^^^^^^^^^^^^^^^ help: it would look like the following `false`
107    |
108    = note: `-D logic-bug` implied by `-D warnings`
109 help: this expression can be optimized out by applying boolean operations to the outer expression
110   --> booleans.rs:36:13
111    |
112 36 |     let _ = a < b && a >= b;
113    |             ^^^^^
114
115 error: this boolean expression contains a logic bug
116   --> booleans.rs:37:13
117    |
118 37 |     let _ = a > b && a <= b;
119    |             ^^^^^^^^^^^^^^^ help: it would look like the following `false`
120    |
121    = note: `-D logic-bug` implied by `-D warnings`
122 help: this expression can be optimized out by applying boolean operations to the outer expression
123   --> booleans.rs:37:13
124    |
125 37 |     let _ = a > b && a <= b;
126    |             ^^^^^
127
128 error: this boolean expression can be simplified
129   --> booleans.rs:39:13
130    |
131 39 |     let _ = a != b || !(a != b || c == d);
132    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133    |
134    = note: `-D nonminimal-bool` implied by `-D warnings`
135 help: try
136    |     let _ = c != d || a != b;
137    |     let _ = !(a == b && c == d);
138
139 error: aborting due to previous error(s)
140
141
142 To learn more, run the command again with --verbose.