diff options
| author | bors <bors@rust-lang.org> | 2023-01-15 15:49:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-15 15:49:40 +0000 |
| commit | 07a7603994b21e14e861edb23b175ab3c84543c0 (patch) | |
| tree | 12003a66bd48ef6d48d84c605092655b1efb3a43 /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.diff | |
| parent | aceb4439d64f2bdb888536f870a04d68d07fa7bf (diff) | |
| parent | d73adea465726944815eb62d373abf6e87dc3b12 (diff) | |
| download | rust-07a7603994b21e14e861edb23b175ab3c84543c0.tar.gz rust-07a7603994b21e14e861edb23b175ab3c84543c0.zip | |
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 -->
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions
