07a7603994
[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 --> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |