Make cargo fix
remove unused imports
#6278
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-fix
Describe the problem you are trying to solve
It would be great, if
cargo fix
could remove unused imports. Import handling is already tedious when using many dependencies without preludes and so it would be great it cargo could automatically remove the superfluous imports.Describe the solution you'd like
cargo fix
and allwarning: unused import:...
messages are gone.Notes
Unfortunately rustc does not give a hint, how to get rid of the warning. So one could either handle the fix in cargo itself or extend rustc's warning message.
The text was updated successfully, but these errors were encountered: