2017-02-07 20:05:30 +00:00
|
|
|
error: this boolean expression contains a logic bug
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:10:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::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
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:10:18
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = a && b || a;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:12:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = !true;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^ help: try: `false`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:13:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:14:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:15:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:15:22
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = false && a;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:16:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = false || a;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `a`
|
|
|
|
|
2017-02-07 20:05:30 +00:00
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:21:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:31:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:31:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = a == b && a != b;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:32:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = a == b && c == 5;
|
2017-07-10 13:29:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = !(c != 5 || a != b);
|
2017-07-10 13:29:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:33:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = a == b && c == 5;
|
2017-07-10 13:29:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = !(c != 5 || a != b);
|
2017-07-10 13:29:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: this boolean expression contains a logic bug
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:34:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:34:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = a < b && a >= b;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: this boolean expression contains a logic bug
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:35:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:35:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = a > b && a <= b;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:37:13
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = c != d || a != b;
|
2017-07-10 13:29:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = !(a == b && c == d);
|
2017-07-10 13:29:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2017-11-14 21:14:08 +00:00
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:45:13
|
2017-11-14 21:14:08 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = !a.is_some();
|
2017-11-14 21:14:08 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_none()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:47:13
|
2017-11-14 21:14:08 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = !a.is_none();
|
2017-11-14 21:14:08 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_some()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:49:13
|
2017-11-14 21:14:08 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = !b.is_err();
|
2017-11-14 21:14:08 +00:00
|
|
|
| ^^^^^^^^^^^ help: try: `b.is_ok()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:51:13
|
2017-11-14 21:14:08 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = !b.is_ok();
|
2017-11-14 21:14:08 +00:00
|
|
|
| ^^^^^^^^^^ help: try: `b.is_err()`
|
|
|
|
|
2017-11-07 21:43:24 +00:00
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:53:13
|
2017-11-07 21:43:24 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = !(a.is_some() && !c);
|
2017-11-14 16:07:04 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try: `c || a.is_none()`
|
2017-11-07 21:43:24 +00:00
|
|
|
|
2017-11-17 21:52:11 +00:00
|
|
|
error: this boolean expression can be simplified
|
2019-09-24 06:06:58 +00:00
|
|
|
--> $DIR/booleans.rs:54:26
|
2017-11-17 21:52:11 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = !(!c ^ c) || !a.is_some();
|
2019-09-24 06:06:58 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_none()`
|
2017-11-17 21:52:11 +00:00
|
|
|
|
2017-11-19 09:07:50 +00:00
|
|
|
error: this boolean expression can be simplified
|
2019-09-24 06:06:58 +00:00
|
|
|
--> $DIR/booleans.rs:55:25
|
2017-11-19 09:07:50 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = (!c ^ c) || !a.is_some();
|
2019-09-24 06:06:58 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_none()`
|
2017-11-19 09:07:50 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-09-24 06:06:58 +00:00
|
|
|
--> $DIR/booleans.rs:56:23
|
2017-11-19 09:07:50 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = !c ^ c || !a.is_some();
|
2019-09-24 06:06:58 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_none()`
|
2017-11-19 09:07:50 +00:00
|
|
|
|
2018-04-07 10:52:18 +00:00
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:128:8
|
2018-12-27 15:57:55 +00:00
|
|
|
|
|
|
|
|
LL | if !res.is_ok() {}
|
|
|
|
| ^^^^^^^^^^^^ help: try: `res.is_err()`
|
2018-04-07 10:52:18 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:129:8
|
2018-12-27 15:57:55 +00:00
|
|
|
|
|
|
|
|
LL | if !res.is_err() {}
|
|
|
|
| ^^^^^^^^^^^^^ help: try: `res.is_ok()`
|
2018-04-07 10:52:18 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:132:8
|
2018-12-27 15:57:55 +00:00
|
|
|
|
|
|
|
|
LL | if !res.is_some() {}
|
|
|
|
| ^^^^^^^^^^^^^^ help: try: `res.is_none()`
|
2018-04-07 10:52:18 +00:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/booleans.rs:133:8
|
2018-12-27 15:57:55 +00:00
|
|
|
|
|
|
|
|
LL | if !res.is_none() {}
|
|
|
|
| ^^^^^^^^^^^^^^ help: try: `res.is_some()`
|
2018-04-07 10:52:18 +00:00
|
|
|
|
|
|
|
error: aborting due to 25 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|