39c8f84f3b
This splits up the needless_bool tests into `fixable.rs` and `simple.rs`. `simple.rs` contains the code that triggers the lint diagnostic without a suggestion.
45 lines
936 B
Plaintext
45 lines
936 B
Plaintext
error: this if-then-else expression will always return true
|
|
--> $DIR/simple.rs:13:5
|
|
|
|
|
LL | / if x {
|
|
LL | | true
|
|
LL | | } else {
|
|
LL | | true
|
|
LL | | };
|
|
| |_____^
|
|
|
|
|
= note: `-D clippy::needless-bool` implied by `-D warnings`
|
|
|
|
error: this if-then-else expression will always return false
|
|
--> $DIR/simple.rs:18:5
|
|
|
|
|
LL | / if x {
|
|
LL | | false
|
|
LL | | } else {
|
|
LL | | false
|
|
LL | | };
|
|
| |_____^
|
|
|
|
error: this if-then-else expression will always return true
|
|
--> $DIR/simple.rs:33:5
|
|
|
|
|
LL | / if x {
|
|
LL | | return true;
|
|
LL | | } else {
|
|
LL | | return true;
|
|
LL | | };
|
|
| |_____^
|
|
|
|
error: this if-then-else expression will always return false
|
|
--> $DIR/simple.rs:41:5
|
|
|
|
|
LL | / if x {
|
|
LL | | return false;
|
|
LL | | } else {
|
|
LL | | return false;
|
|
LL | | };
|
|
| |_____^
|
|
|
|
error: aborting due to 4 previous errors
|
|
|