bad suggestion for unused_parens, needs space in replacement #112276
Labels
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
Problem
Running the command
cargo fix
fails to fix the following minimal example:and gives the following output
Steps
cargo init
main.rs
cargo fix --allow-no-vcs
Possible Solution(s)
The fix command isn't adding a space where it should (in between
return
andtrue
). If you add the space in, the bug does not occur.Notes
Running
cargo clippy --fix
doesn't produce the same bug.Version
Cargo version on a Replit Rust Repl. (I was able to reproduce the bug there.)
The text was updated successfully, but these errors were encountered: