2019-08-05 20:05:05 +00:00
|
|
|
error: this if-then-else expression will always return true
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_bool/simple.rs:14:5
|
2019-08-05 20:05:05 +00:00
|
|
|
|
|
|
|
|
LL | / if x {
|
|
|
|
LL | | true
|
|
|
|
LL | | } else {
|
|
|
|
LL | | true
|
|
|
|
LL | | };
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-bool` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::needless_bool)]`
|
2019-08-05 20:05:05 +00:00
|
|
|
|
|
|
|
error: this if-then-else expression will always return false
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_bool/simple.rs:19:5
|
2019-08-05 20:05:05 +00:00
|
|
|
|
|
|
|
|
LL | / if x {
|
|
|
|
LL | | false
|
|
|
|
LL | | } else {
|
|
|
|
LL | | false
|
|
|
|
LL | | };
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this if-then-else expression will always return true
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_bool/simple.rs:34:5
|
2019-08-05 20:05:05 +00:00
|
|
|
|
|
|
|
|
LL | / if x {
|
|
|
|
LL | | return true;
|
|
|
|
LL | | } else {
|
|
|
|
LL | | return true;
|
|
|
|
LL | | };
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this if-then-else expression will always return false
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/needless_bool/simple.rs:42:5
|
2019-08-05 20:05:05 +00:00
|
|
|
|
|
|
|
|
LL | / if x {
|
|
|
|
LL | | return false;
|
|
|
|
LL | | } else {
|
|
|
|
LL | | return false;
|
|
|
|
LL | | };
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|