1 error: this boolean expression contains a logic bug
4 12 | let _ = a && b || a;
5 | ^^^^^^^^^^^ help: it would look like the following `a`
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
11 12 | let _ = a && b || a;
14 error: this boolean expression can be simplified
18 | ^^^^^ help: try `false`
20 = note: `-D nonminimal-bool` implied by `-D warnings`
22 error: this boolean expression can be simplified
26 | ^^^^^^ help: try `true`
28 = note: `-D nonminimal-bool` implied by `-D warnings`
30 error: this boolean expression can be simplified
36 = note: `-D nonminimal-bool` implied by `-D warnings`
38 error: this boolean expression contains a logic bug
41 17 | let _ = false && a;
42 | ^^^^^^^^^^ help: it would look like the following `false`
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
48 17 | let _ = false && a;
51 error: this boolean expression can be simplified
54 18 | let _ = false || a;
55 | ^^^^^^^^^^ help: try `a`
57 = note: `-D nonminimal-bool` implied by `-D warnings`
59 error: this boolean expression can be simplified
62 23 | let _ = !(!a && b);
63 | ^^^^^^^^^^ help: try `!b || a`
65 = note: `-D nonminimal-bool` implied by `-D warnings`
67 error: this boolean expression contains a logic bug
70 33 | let _ = a == b && a != b;
71 | ^^^^^^^^^^^^^^^^ help: it would look like the following `false`
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
77 33 | let _ = a == b && a != b;
80 error: this boolean expression can be simplified
83 34 | let _ = a == b && c == 5 && a == b;
84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
86 = note: `-D nonminimal-bool` implied by `-D warnings`
88 | let _ = a == b && c == 5;
89 | let _ = !(c != 5 || a != b);
91 error: this boolean expression can be simplified
94 35 | let _ = a == b && c == 5 && b == a;
95 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
97 = note: `-D nonminimal-bool` implied by `-D warnings`
99 | let _ = a == b && c == 5;
100 | let _ = !(c != 5 || a != b);
102 error: this boolean expression contains a logic bug
103 --> booleans.rs:36:13
105 36 | let _ = a < b && a >= b;
106 | ^^^^^^^^^^^^^^^ help: it would look like the following `false`
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
112 36 | let _ = a < b && a >= b;
115 error: this boolean expression contains a logic bug
116 --> booleans.rs:37:13
118 37 | let _ = a > b && a <= b;
119 | ^^^^^^^^^^^^^^^ help: it would look like the following `false`
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
125 37 | let _ = a > b && a <= b;
128 error: this boolean expression can be simplified
129 --> booleans.rs:39:13
131 39 | let _ = a != b || !(a != b || c == d);
132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134 = note: `-D nonminimal-bool` implied by `-D warnings`
136 | let _ = c != d || a != b;
137 | let _ = !(a == b && c == d);
139 error: aborting due to previous error(s)
142 To learn more, run the command again with --verbose.