fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: this `if` branch is empty 2 --> $DIR/needless_if.rs:26:5 3 | 4LL | if (true) {} 5 | ^^^^^^^^^^^^ help: you can remove it 6 | 7 = note: `-D clippy::needless-if` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::needless_if)]` 9 10error: this `if` branch is empty 11 --> $DIR/needless_if.rs:28:5 12 | 13LL | if maybe_side_effect() {} 14 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `maybe_side_effect();` 15 16error: this `if` branch is empty 17 --> $DIR/needless_if.rs:33:5 18 | 19LL | / if { 20LL | | return; 21LL | | } {} 22 | |________^ 23 | 24help: you can remove it 25 | 26LL ~ ({ 27LL + return; 28LL + }); 29 | 30 31error: this `if` branch is empty 32 --> $DIR/needless_if.rs:45:5 33 | 34LL | / if { 35LL | | if let true = true && true { true } else { false } 36LL | | } && true 37LL | | {} 38 | |______^ 39 | 40help: you can remove it 41 | 42LL ~ ({ 43LL + if let true = true && true { true } else { false } 44LL + } && true); 45 | 46 47error: this `if` branch is empty 48 --> $DIR/needless_if.rs:83:5 49 | 50LL | if { maybe_side_effect() } {} 51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `({ maybe_side_effect() });` 52 53error: this `if` branch is empty 54 --> $DIR/needless_if.rs:85:5 55 | 56LL | if { maybe_side_effect() } && true {} 57 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `({ maybe_side_effect() } && true);` 58 59error: this `if` branch is empty 60 --> $DIR/needless_if.rs:89:5 61 | 62LL | if true {} 63 | ^^^^^^^^^^ help: you can remove it: `true;` 64 65error: aborting due to 7 previous errors 66