1 error: this boolean expression contains a logic bug
2 --> $DIR/booleans.rs:12:13
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
9 --> $DIR/booleans.rs:12:18
11 12 | let _ = a && b || a;
14 error: this boolean expression can be simplified
15 --> $DIR/booleans.rs:14:13
18 | ^^^^^ help: try: `false`
20 = note: `-D nonminimal-bool` implied by `-D warnings`
22 error: this boolean expression can be simplified
23 --> $DIR/booleans.rs:15:13
26 | ^^^^^^ help: try: `true`
28 error: this boolean expression can be simplified
29 --> $DIR/booleans.rs:16:13
34 error: this boolean expression contains a logic bug
35 --> $DIR/booleans.rs:17:13
37 17 | let _ = false && a;
38 | ^^^^^^^^^^ help: it would look like the following: `false`
40 help: this expression can be optimized out by applying boolean operations to the outer expression
41 --> $DIR/booleans.rs:17:22
43 17 | let _ = false && a;
46 error: this boolean expression can be simplified
47 --> $DIR/booleans.rs:18:13
49 18 | let _ = false || a;
50 | ^^^^^^^^^^ help: try: `a`
52 error: this boolean expression can be simplified
53 --> $DIR/booleans.rs:23:13
55 23 | let _ = !(!a && b);
56 | ^^^^^^^^^^ help: try: `!b || a`
58 error: this boolean expression contains a logic bug
59 --> $DIR/booleans.rs:33:13
61 33 | let _ = a == b && a != b;
62 | ^^^^^^^^^^^^^^^^ help: it would look like the following: `false`
64 help: this expression can be optimized out by applying boolean operations to the outer expression
65 --> $DIR/booleans.rs:33:13
67 33 | let _ = a == b && a != b;
70 error: this boolean expression can be simplified
71 --> $DIR/booleans.rs:34:13
73 34 | let _ = a == b && c == 5 && a == b;
74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
78 34 | let _ = a == b && c == 5;
80 34 | let _ = !(c != 5 || a != b);
83 error: this boolean expression can be simplified
84 --> $DIR/booleans.rs:35:13
86 35 | let _ = a == b && c == 5 && b == a;
87 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
91 35 | let _ = a == b && c == 5;
93 35 | let _ = !(c != 5 || a != b);
96 error: this boolean expression contains a logic bug
97 --> $DIR/booleans.rs:36:13
99 36 | let _ = a < b && a >= b;
100 | ^^^^^^^^^^^^^^^ help: it would look like the following: `false`
102 help: this expression can be optimized out by applying boolean operations to the outer expression
103 --> $DIR/booleans.rs:36:13
105 36 | let _ = a < b && a >= b;
108 error: this boolean expression contains a logic bug
109 --> $DIR/booleans.rs:37:13
111 37 | let _ = a > b && a <= b;
112 | ^^^^^^^^^^^^^^^ help: it would look like the following: `false`
114 help: this expression can be optimized out by applying boolean operations to the outer expression
115 --> $DIR/booleans.rs:37:13
117 37 | let _ = a > b && a <= b;
120 error: this boolean expression can be simplified
121 --> $DIR/booleans.rs:39:13
123 39 | let _ = a != b || !(a != b || c == d);
124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128 39 | let _ = c != d || a != b;
130 39 | let _ = !(a == b && c == d);
131 | ^^^^^^^^^^^^^^^^^^^
133 error: this boolean expression can be simplified
134 --> $DIR/booleans.rs:47:13
136 47 | let _ = !a.is_some();
137 | ^^^^^^^^^^^^ help: try: `a.is_none()`
139 error: this boolean expression can be simplified
140 --> $DIR/booleans.rs:49:13
142 49 | let _ = !a.is_none();
143 | ^^^^^^^^^^^^ help: try: `a.is_some()`
145 error: this boolean expression can be simplified
146 --> $DIR/booleans.rs:51:13
148 51 | let _ = !b.is_err();
149 | ^^^^^^^^^^^ help: try: `b.is_ok()`
151 error: this boolean expression can be simplified
152 --> $DIR/booleans.rs:53:13
154 53 | let _ = !b.is_ok();
155 | ^^^^^^^^^^ help: try: `b.is_err()`
157 error: this boolean expression can be simplified
158 --> $DIR/booleans.rs:55:13
160 55 | let _ = !(a.is_some() && !c);
161 | ^^^^^^^^^^^^^^^^^^^^ help: try: `c || a.is_none()`