blob: 7c7fcdc1836683ba27110039f082d30493a25bfd [file]
error: this `if` branch is empty
--> tests/ui/needless_ifs.rs:25:5
|
LL | if (true) {}
| ^^^^^^^^^^^^ help: you can remove it
|
= note: `-D clippy::needless-ifs` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_ifs)]`
error: this `if` branch is empty
--> tests/ui/needless_ifs.rs:28:5
|
LL | if maybe_side_effect() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `maybe_side_effect();`
error: this `if` branch is empty
--> tests/ui/needless_ifs.rs:34:5
|
LL | / if {
LL | |
LL | | return;
LL | | } {}
| |________^
|
help: you can remove it
|
LL ~ ({
LL +
LL + return;
LL + });
|
error: this `if` branch is empty
--> tests/ui/needless_ifs.rs:49:5
|
LL | / if {
LL | |
LL | | if let true = true
LL | | && true
... |
LL | | } && true
LL | | {}
| |______^
|
help: you can remove it
|
LL ~ ({
LL +
LL + if let true = true
LL + && true
LL + {
LL + true
LL + } else {
LL + false
LL + }
LL + } && true);
|
error: this `if` branch is empty
--> tests/ui/needless_ifs.rs:94:5
|
LL | if { maybe_side_effect() } {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `({ maybe_side_effect() });`
error: this `if` branch is empty
--> tests/ui/needless_ifs.rs:97:5
|
LL | if { maybe_side_effect() } && true {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `({ maybe_side_effect() } && true);`
error: this `if` branch is empty
--> tests/ui/needless_ifs.rs:102:5
|
LL | if true {}
| ^^^^^^^^^^ help: you can remove it: `true;`
error: this `if` branch is empty
--> tests/ui/needless_ifs.rs:109:5
|
LL | if matches!(2, 3) {}
| ^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `matches!(2, 3);`
error: this `if` branch is empty
--> tests/ui/needless_ifs.rs:111:5
|
LL | if matches!(2, 3) == (2 * 2 == 5) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `matches!(2, 3) == (2 * 2 == 5);`
error: this `if` branch is empty
--> tests/ui/needless_ifs.rs:121:5
|
LL | if true {␋}
| ^^^^^^^^^^^ help: you can remove it
error: aborting due to 10 previous errors