rust/clippy_utils
bors 07a7603994 Auto merge of #10187 - dswij:issue-10182-semicolon, r=Jarcho
[needless_return]: Remove all semicolons on suggestion

Closes #10182

Multiple semicolons currently breaks autofix for `needless_return` suggestions. Any semicolons left after removing return means that the return type will always be `()`, and thus fail to compile.

This PR allows `needless_return` to remove multiple semicolons.

The change won't cover the case where there is multiple line yet.

i.e.

```rust
fn needless_return() -> bool {
    return true;
;;
}
```

---

changelog: Sugg: [`needless_return`]: Now removes all semicolons on the same line
[#10187](https://github.com/rust-lang/rust-clippy/pull/10187)
<!-- changelog_checked -->
2023-01-15 15:49:40 +00:00
..
src Auto merge of #10187 - dswij:issue-10182-semicolon, r=Jarcho 2023-01-15 15:49:40 +00:00
Cargo.toml Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyup 2022-12-17 14:12:54 +01:00