mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-06 01:50:37 +00:00
Added remove unused imports assist This resolves the most important part of #5131. I needed to make a couple of cosmetic changes to the search infrastructure to do this. A few open questions: * Should imports that don't resolve to anything be considered unused? I figured probably not, but it would be a trivial change to make if we want it. * Is there a cleaner way to make the edits to the use list? * Is there a cleaner way to get the list of uses that intersect the current selection? * Is the performance acceptable? When testing this on itself, it takes a good couple seconds to perform the assist. * Is there a way to hide the rustc diagnostics that overlap with this functionality? |
||
|---|---|---|
| .. | ||
| fuzz | ||
| src | ||
| test_data | ||
| Cargo.toml | ||
| rust.ungram | ||