2023-06-11 06:50:03 -05:00
|
|
|
error: this `if` branch is empty
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/needless_if.rs:26: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
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/needless_if.rs:28:5
|
2023-06-11 06:50:03 -05:00
|
|
|
|
|
2023-06-12 10:05:14 -05:00
|
|
|
LL | if maybe_side_effect() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `maybe_side_effect();`
|
2023-06-11 06:50:03 -05:00
|
|
|
|
|
|
|
error: this `if` branch is empty
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/needless_if.rs:33:5
|
2023-06-10 06:43:30 -05:00
|
|
|
|
|
|
|
|
LL | / if {
|
|
|
|
LL | | return;
|
|
|
|
LL | | } {}
|
|
|
|
| |________^
|
|
|
|
|
|
|
|
|
help: you can remove it
|
|
|
|
|
|
2023-06-12 10:05:14 -05:00
|
|
|
LL ~ ({
|
2023-06-10 06:43:30 -05:00
|
|
|
LL + return;
|
2023-06-12 10:05:14 -05:00
|
|
|
LL + });
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this `if` branch is empty
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/needless_if.rs:45:5
|
2023-06-12 10:05:14 -05:00
|
|
|
|
|
|
|
|
LL | / if {
|
|
|
|
LL | | if let true = true && true { true } else { false }
|
|
|
|
LL | | } && true
|
|
|
|
LL | | {}
|
|
|
|
| |______^
|
|
|
|
|
|
|
|
|
help: you can remove it
|
|
|
|
|
|
|
|
|
LL ~ ({
|
|
|
|
LL + if let true = true && true { true } else { false }
|
|
|
|
LL + } && true);
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this `if` branch is empty
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/needless_if.rs:83:5
|
2023-06-12 10:05:14 -05:00
|
|
|
|
|
|
|
|
LL | if { maybe_side_effect() } {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `({ maybe_side_effect() });`
|
|
|
|
|
|
|
|
error: this `if` branch is empty
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/needless_if.rs:85:5
|
2023-06-12 10:05:14 -05:00
|
|
|
|
|
|
|
|
LL | if { maybe_side_effect() } && true {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `({ maybe_side_effect() } && true);`
|
|
|
|
|
|
|
|
error: this `if` branch is empty
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/needless_if.rs:89:5
|
2023-06-10 06:43:30 -05:00
|
|
|
|
|
2023-06-12 10:05:14 -05:00
|
|
|
LL | if true {}
|
|
|
|
| ^^^^^^^^^^ help: you can remove it: `true;`
|
2023-06-10 06:43:30 -05:00
|
|
|
|
2023-06-12 10:05:14 -05:00
|
|
|
error: aborting due to 7 previous errors
|
2023-06-10 06:43:30 -05:00
|
|
|
|