needless_return fix doesn't compile with extra semicolon present #7358
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
I tried this code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=795f032d10430e5954f6a119e2e5bcbd
And used
--fix
I expected to see this happen:
Needless returns removed, with extra semicolon deleted.
Instead, this happened:
Needless returns removed, but extra semicolon still present, so compile fails:
Meta
cargo clippy -V
: clippy 0.1.54 (607d6b0 2021-06-15)rustc -Vv
:The text was updated successfully, but these errors were encountered: