2017-02-07 14:05:30 -06:00
|
|
|
error: this boolean expression contains a logic bug
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:22:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
22 | let _ = a && b || a;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^^ help: it would look like the following: `a`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
= note: `-D clippy::logic-bug` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
help: this expression can be optimized out by applying boolean operations to the outer expression
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:22:18
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
22 | let _ = a && b || a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:24:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
24 | let _ = !true;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^ help: try: `false`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:25:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
25 | let _ = !false;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^ help: try: `true`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:26:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
26 | let _ = !!a;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^ help: try: `a`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: this boolean expression contains a logic bug
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:27:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
27 | let _ = false && a;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^ help: it would look like the following: `false`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
|
help: this expression can be optimized out by applying boolean operations to the outer expression
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:27:22
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
27 | let _ = false && a;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:28:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
28 | let _ = false || a;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^ help: try: `a`
|
|
|
|
|
2017-02-07 14:05:30 -06:00
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:33:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
33 | let _ = !(!a && b);
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^ help: try: `!b || a`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: this boolean expression contains a logic bug
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:43:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
43 | let _ = a == b && a != b;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: it would look like the following: `false`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
|
help: this expression can be optimized out by applying boolean operations to the outer expression
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:43:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
43 | let _ = a == b && a != b;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:44:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
44 | let _ = a == b && c == 5 && a == b;
|
2017-05-14 02:56:10 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: try
|
2017-07-10 08:29:29 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
44 | let _ = a == b && c == 5;
|
2017-07-10 08:29:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-10-06 11:18:06 -05:00
|
|
|
44 | let _ = !(c != 5 || a != b);
|
2017-07-10 08:29:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:45:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
45 | let _ = a == b && c == 5 && b == a;
|
2017-05-14 02:56:10 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: try
|
2017-07-10 08:29:29 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
45 | let _ = a == b && c == 5;
|
2017-07-10 08:29:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-10-06 11:18:06 -05:00
|
|
|
45 | let _ = !(c != 5 || a != b);
|
2017-07-10 08:29:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: this boolean expression contains a logic bug
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:46:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
46 | let _ = a < b && a >= b;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^^^^^^ help: it would look like the following: `false`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
|
help: this expression can be optimized out by applying boolean operations to the outer expression
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:46:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
46 | let _ = a < b && a >= b;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: this boolean expression contains a logic bug
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:47:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
47 | let _ = a > b && a <= b;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^^^^^^ help: it would look like the following: `false`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
|
help: this expression can be optimized out by applying boolean operations to the outer expression
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:47:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
47 | let _ = a > b && a <= b;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:49:13
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
49 | let _ = a != b || !(a != b || c == d);
|
2017-05-14 02:56:10 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: try
|
2017-07-10 08:29:29 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
49 | let _ = c != d || a != b;
|
2017-07-10 08:29:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-10-06 11:18:06 -05:00
|
|
|
49 | let _ = !(a == b && c == d);
|
2017-07-10 08:29:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2017-11-14 15:14:08 -06:00
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:57:13
|
2017-11-14 15:14:08 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
57 | let _ = !a.is_some();
|
2017-11-14 15:14:08 -06:00
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_none()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:59:13
|
2017-11-14 15:14:08 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
59 | let _ = !a.is_none();
|
2017-11-14 15:14:08 -06:00
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_some()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:61:13
|
2017-11-14 15:14:08 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
61 | let _ = !b.is_err();
|
2017-11-14 15:14:08 -06:00
|
|
|
| ^^^^^^^^^^^ help: try: `b.is_ok()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:63:13
|
2017-11-14 15:14:08 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
63 | let _ = !b.is_ok();
|
2017-11-14 15:14:08 -06:00
|
|
|
| ^^^^^^^^^^ help: try: `b.is_err()`
|
|
|
|
|
2017-11-07 15:43:24 -06:00
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:65:13
|
2017-11-07 15:43:24 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
65 | let _ = !(a.is_some() && !c);
|
2017-11-14 10:07:04 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try: `c || a.is_none()`
|
2017-11-07 15:43:24 -06:00
|
|
|
|
2017-11-17 15:52:11 -06:00
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:66:13
|
2017-11-17 15:52:11 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
66 | let _ = !(!c ^ c) || !a.is_some();
|
2017-11-17 15:52:11 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(!c ^ c) || a.is_none()`
|
|
|
|
|
2017-11-19 03:07:50 -06:00
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:67:13
|
2017-11-19 03:07:50 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
67 | let _ = (!c ^ c) || !a.is_some();
|
2017-11-19 03:07:50 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(!c ^ c) || a.is_none()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:68:13
|
2017-11-19 03:07:50 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
68 | let _ = !c ^ c || !a.is_some();
|
2017-11-19 03:07:50 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `!c ^ c || a.is_none()`
|
|
|
|
|
2018-04-07 05:52:18 -05:00
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:120:8
|
2018-04-07 05:52:18 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
120 | if !res.is_ok() { }
|
2018-04-07 05:52:18 -05:00
|
|
|
| ^^^^^^^^^^^^ help: try: `res.is_err()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:121:8
|
2018-04-07 05:52:18 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
121 | if !res.is_err() { }
|
2018-04-07 05:52:18 -05:00
|
|
|
| ^^^^^^^^^^^^^ help: try: `res.is_ok()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:124:8
|
2018-04-07 05:52:18 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
124 | if !res.is_some() { }
|
2018-04-07 05:52:18 -05:00
|
|
|
| ^^^^^^^^^^^^^^ help: try: `res.is_none()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/booleans.rs:125:8
|
2018-04-07 05:52:18 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
125 | if !res.is_none() { }
|
2018-04-07 05:52:18 -05:00
|
|
|
| ^^^^^^^^^^^^^^ help: try: `res.is_some()`
|
|
|
|
|
|
|
|
error: aborting due to 25 previous errors
|
2018-01-16 10:06:27 -06:00
|
|
|
|