2023-06-11 06:50:03 -05:00
|
|
|
error: this `if` branch is empty
|
|
|
|
--> $DIR/needless_if.rs:30:5
|
2023-06-10 06:43:30 -05:00
|
|
|
|
|
|
|
|
LL | if (true) {}
|
2023-06-11 06:50:03 -05:00
|
|
|
| ^^^^^^^^^^^^ help: you can remove it
|
2023-06-10 06:43:30 -05:00
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-if` implied by `-D warnings`
|
|
|
|
|
2023-06-11 06:50:03 -05:00
|
|
|
error: this `if` branch is empty
|
|
|
|
--> $DIR/needless_if.rs:32:5
|
|
|
|
|
|
|
|
|
LL | if no_side_effects() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `no_side_effects();`
|
|
|
|
|
|
|
|
error: this `if` branch is empty
|
|
|
|
--> $DIR/needless_if.rs:34:5
|
|
|
|
|
|
|
|
|
LL | if has_side_effects(&mut x) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `has_side_effects(&mut x);`
|
|
|
|
|
|
|
|
error: this `if` branch is empty
|
|
|
|
--> $DIR/needless_if.rs:40:5
|
2023-06-10 06:43:30 -05:00
|
|
|
|
|
|
|
|
LL | / if {
|
|
|
|
LL | | return;
|
|
|
|
LL | | } {}
|
|
|
|
| |________^
|
|
|
|
|
|
|
|
|
help: you can remove it
|
|
|
|
|
|
|
|
|
LL ~ {
|
|
|
|
LL + return;
|
|
|
|
LL + };
|
|
|
|
|
|
|
|
|
|
2023-06-11 06:50:03 -05:00
|
|
|
error: aborting due to 4 previous errors
|
2023-06-10 06:43:30 -05:00
|
|
|
|