2017-02-07 20:05:30 +00:00
|
|
|
error: this boolean expression contains a logic bug
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:12:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-02-08 13:58:07 +00:00
|
|
|
12 | let _ = a && b || a;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^ help: it would look like the following: `a`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
= note: `-D logic-bug` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
help: this expression can be optimized out by applying boolean operations to the outer expression
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:12:18
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-02-08 13:58:07 +00:00
|
|
|
12 | let _ = a && b || a;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:14:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
14 | let _ = !true;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^ help: try: `false`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
= note: `-D nonminimal-bool` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:15:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
15 | let _ = !false;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^ help: try: `true`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:16:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
16 | let _ = !!a;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^ help: try: `a`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression contains a logic bug
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:17:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
17 | let _ = false && a;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^ help: it would look like the following: `false`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
|
help: this expression can be optimized out by applying boolean operations to the outer expression
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:17:22
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
17 | let _ = false && a;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:18:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
18 | let _ = false || a;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `a`
|
|
|
|
|
|
|
|
error: this boolean expression contains a logic bug
|
|
|
|
--> booleans.rs:20:13
|
|
|
|
|
|
|
|
|
20 | let _ = cfg!(you_shall_not_not_pass) && a;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: it would look like the following: `false`
|
|
|
|
|
|
|
|
|
help: this expression can be optimized out by applying boolean operations to the outer expression
|
|
|
|
--> booleans.rs:20:45
|
|
|
|
|
|
|
|
|
20 | let _ = cfg!(you_shall_not_not_pass) && a;
|
|
|
|
| ^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:23:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
23 | let _ = !(!a && b);
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `!b || a`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression contains a logic bug
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:33:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
33 | let _ = a == b && a != b;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: it would look like the following: `false`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
|
help: this expression can be optimized out by applying boolean operations to the outer expression
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:33:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
33 | let _ = a == b && a != b;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:34:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
34 | let _ = a == b && c == 5 && a == b;
|
2017-05-14 07:56:10 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
|
|
|
34 | let _ = a == b && c == 5;
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
34 | let _ = !(c != 5 || a != b);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:35:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
35 | let _ = a == b && c == 5 && b == a;
|
2017-05-14 07:56:10 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
|
|
|
35 | let _ = a == b && c == 5;
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
35 | let _ = !(c != 5 || a != b);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression contains a logic bug
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:36:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
36 | let _ = a < b && a >= b;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ help: it would look like the following: `false`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
|
help: this expression can be optimized out by applying boolean operations to the outer expression
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:36:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
36 | let _ = a < b && a >= b;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: this boolean expression contains a logic bug
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:37:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
37 | let _ = a > b && a <= b;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ help: it would look like the following: `false`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
|
help: this expression can be optimized out by applying boolean operations to the outer expression
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:37:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
37 | let _ = a > b && a <= b;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2017-05-17 15:51:35 +00:00
|
|
|
--> booleans.rs:39:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-10 15:07:54 +00:00
|
|
|
39 | let _ = a != b || !(a != b || c == d);
|
2017-05-14 07:56:10 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try
|
2017-07-10 13:29:29 +00:00
|
|
|
|
|
|
|
|
39 | let _ = c != d || a != b;
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
39 | let _ = !(a == b && c == d);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2017-07-21 08:40:23 +00:00
|
|
|
error: aborting due to 14 previous errors
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
|
|
|
|
To learn more, run the command again with --verbose.
|