rust-clippy/tests/ui/nonminimal_bool_methods.stderr

83 lines
2.5 KiB
Text
Raw Normal View History

2020-01-13 22:41:11 +00:00
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:9:13
2020-01-13 22:41:11 +00:00
|
LL | let _ = !a.is_some();
| ^^^^^^^^^^^^ help: try: `a.is_none()`
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:11:13
2020-01-13 22:41:11 +00:00
|
LL | let _ = !a.is_none();
| ^^^^^^^^^^^^ help: try: `a.is_some()`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:13:13
2020-01-13 22:41:11 +00:00
|
LL | let _ = !b.is_err();
| ^^^^^^^^^^^ help: try: `b.is_ok()`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:15:13
2020-01-13 22:41:11 +00:00
|
LL | let _ = !b.is_ok();
| ^^^^^^^^^^ help: try: `b.is_err()`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:17:13
2020-01-13 22:41:11 +00:00
|
LL | let _ = !(a.is_some() && !c);
| ^^^^^^^^^^^^^^^^^^^^ help: try: `a.is_none() || c`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:18:13
2020-01-13 22:41:11 +00:00
|
LL | let _ = !(a.is_some() || !c);
| ^^^^^^^^^^^^^^^^^^^^ help: try: `a.is_none() && c`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:19:26
2020-01-13 22:41:11 +00:00
|
LL | let _ = !(!c ^ c) || !a.is_some();
| ^^^^^^^^^^^^ help: try: `a.is_none()`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:20:25
2020-01-13 22:41:11 +00:00
|
LL | let _ = (!c ^ c) || !a.is_some();
| ^^^^^^^^^^^^ help: try: `a.is_none()`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:21:23
2020-01-13 22:41:11 +00:00
|
LL | let _ = !c ^ c || !a.is_some();
| ^^^^^^^^^^^^ help: try: `a.is_none()`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:93:8
2020-01-13 22:41:11 +00:00
|
LL | if !res.is_ok() {}
| ^^^^^^^^^^^^ help: try: `res.is_err()`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:94:8
2020-01-13 22:41:11 +00:00
|
LL | if !res.is_err() {}
| ^^^^^^^^^^^^^ help: try: `res.is_ok()`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:97:8
2020-01-13 22:41:11 +00:00
|
LL | if !res.is_some() {}
| ^^^^^^^^^^^^^^ help: try: `res.is_none()`
error: this boolean expression can be simplified
--> $DIR/nonminimal_bool_methods.rs:98:8
2020-01-13 22:41:11 +00:00
|
LL | if !res.is_none() {}
| ^^^^^^^^^^^^^^ help: try: `res.is_some()`
error: aborting due to 13 previous errors