Overly verbose suggestion display for trailing whitespace changes #140750
Labels
C-bug
Category: This is a bug.
D-diagnostic-infra
Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
When a suggestion removes a line the diff suggests removing and re-adding the previous line. We do these kinds of suggestions a fair bit in clippy to make
--fix
actually remove the line.e.g. in
needless_return
the code:Gives the suggestion:
This suggests to remove and re-add
println!("foo");
rather than just remove thereturn
line. The lint span spanning multiple lines is entirely on clippy, but the suggestion display can't be fixed by us.cc rust-lang/rust-clippy#14750
The text was updated successfully, but these errors were encountered: