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 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
77 34 | let _ = a == b && c == 5;
79 34 | let _ = !(c != 5 || a != b);
82 error: this boolean expression can be simplified
83 --> $DIR/booleans.rs:35:13
85 35 | let _ = a == b && c == 5 && b == a;
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
89 35 | let _ = a == b && c == 5;
91 35 | let _ = !(c != 5 || a != b);
94 error: this boolean expression contains a logic bug
95 --> $DIR/booleans.rs:36:13
97 36 | let _ = a < b && a >= b;
98 | ^^^^^^^^^^^^^^^ help: it would look like the following: `false`
100 help: this expression can be optimized out by applying boolean operations to the outer expression
101 --> $DIR/booleans.rs:36:13
103 36 | let _ = a < b && a >= b;
106 error: this boolean expression contains a logic bug
107 --> $DIR/booleans.rs:37:13
109 37 | let _ = a > b && a <= b;
110 | ^^^^^^^^^^^^^^^ help: it would look like the following: `false`
112 help: this expression can be optimized out by applying boolean operations to the outer expression
113 --> $DIR/booleans.rs:37:13
115 37 | let _ = a > b && a <= b;
118 error: this boolean expression can be simplified
119 --> $DIR/booleans.rs:39:13
121 39 | let _ = a != b || !(a != b || c == d);
122 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125 39 | let _ = c != d || a != b;
127 39 | let _ = !(a == b && c == d);
128 | ^^^^^^^^^^^^^^^^^^^
130 error: this boolean expression can be simplified
131 --> $DIR/booleans.rs:47:13
133 47 | let _ = !a.is_some();
134 | ^^^^^^^^^^^^ help: try: `a.is_none()`
136 error: this boolean expression can be simplified
137 --> $DIR/booleans.rs:49:13
139 49 | let _ = !a.is_none();
140 | ^^^^^^^^^^^^ help: try: `a.is_some()`
142 error: this boolean expression can be simplified
143 --> $DIR/booleans.rs:51:13
145 51 | let _ = !b.is_err();
146 | ^^^^^^^^^^^ help: try: `b.is_ok()`
148 error: this boolean expression can be simplified
149 --> $DIR/booleans.rs:53:13
151 53 | let _ = !b.is_ok();
152 | ^^^^^^^^^^ help: try: `b.is_err()`
154 error: this boolean expression can be simplified
155 --> $DIR/booleans.rs:55:13
157 55 | let _ = !(a.is_some() && !c);
158 | ^^^^^^^^^^^^^^^^^^^^ help: try: `c || a.is_none()`
160 error: this boolean expression can be simplified
161 --> $DIR/booleans.rs:56:13
163 56 | let _ = !(!c ^ c) || !a.is_some();
164 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(!c ^ c) || a.is_none()`
166 error: this boolean expression can be simplified
167 --> $DIR/booleans.rs:57:13
169 57 | let _ = (!c ^ c) || !a.is_some();
170 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(!c ^ c) || a.is_none()`
172 error: this boolean expression can be simplified
173 --> $DIR/booleans.rs:58:13
175 58 | let _ = !c ^ c || !a.is_some();
176 | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!c ^ c || a.is_none()`
178 error: this boolean expression can be simplified
179 --> $DIR/booleans.rs:110:8
181 110 | if !res.is_ok() { }
182 | ^^^^^^^^^^^^ help: try: `res.is_err()`
184 error: this boolean expression can be simplified
185 --> $DIR/booleans.rs:111:8
187 111 | if !res.is_err() { }
188 | ^^^^^^^^^^^^^ help: try: `res.is_ok()`
190 error: this boolean expression can be simplified
191 --> $DIR/booleans.rs:114:8
193 114 | if !res.is_some() { }
194 | ^^^^^^^^^^^^^^ help: try: `res.is_none()`
196 error: this boolean expression can be simplified
197 --> $DIR/booleans.rs:115:8
199 115 | if !res.is_none() { }
200 | ^^^^^^^^^^^^^^ help: try: `res.is_some()`
202 error: aborting due to 25 previous errors