2020-01-13 16:41:11 -06:00
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:10:13
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = !a.is_some();
|
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_none()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::nonminimal_bool)]`
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:12:13
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = !a.is_none();
|
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_some()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:14:13
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = !b.is_err();
|
|
|
|
| ^^^^^^^^^^^ help: try: `b.is_ok()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:16:13
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = !b.is_ok();
|
|
|
|
| ^^^^^^^^^^ help: try: `b.is_err()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:18:13
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = !(a.is_some() && !c);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try: `a.is_none() || c`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:19:13
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = !(a.is_some() || !c);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try: `a.is_none() && c`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:20:26
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = !(!c ^ c) || !a.is_some();
|
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_none()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:21:25
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = (!c ^ c) || !a.is_some();
|
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_none()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:22:23
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = !c ^ c || !a.is_some();
|
|
|
|
| ^^^^^^^^^^^^ help: try: `a.is_none()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:94:8
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | if !res.is_ok() {}
|
|
|
|
| ^^^^^^^^^^^^ help: try: `res.is_err()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:95:8
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | if !res.is_err() {}
|
|
|
|
| ^^^^^^^^^^^^^ help: try: `res.is_ok()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:98:8
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | if !res.is_some() {}
|
|
|
|
| ^^^^^^^^^^^^^^ help: try: `res.is_none()`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
2024-03-07 10:19:29 -06:00
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:99:8
|
2020-01-13 16:41:11 -06:00
|
|
|
|
|
|
|
|
LL | if !res.is_none() {}
|
|
|
|
| ^^^^^^^^^^^^^^ help: try: `res.is_some()`
|
|
|
|
|
2024-04-18 10:48:52 -05:00
|
|
|
error: this boolean expression can be simplified
|
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:115:8
|
|
|
|
|
|
|
|
|
LL | if !(a as u64 >= b) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `(a as u64) < b`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:116:8
|
|
|
|
|
|
|
|
|
LL | if !((a as u64) >= b) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `(a as u64) < b`
|
|
|
|
|
|
|
|
error: this boolean expression can be simplified
|
|
|
|
--> tests/ui/nonminimal_bool_methods.rs:117:8
|
|
|
|
|
|
|
|
|
LL | if !(a as u64 <= b) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `a as u64 > b`
|
|
|
|
|
|
|
|
error: aborting due to 16 previous errors
|
2020-01-13 16:41:11 -06:00
|
|
|
|