mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 17:58:16 +00:00
691600a885
Clean up `ImportMap` There are several things in `hir_def::import_map` that are never used. This PR removes them and restructures the code. Namely: - Removes `Query::name_only`, because it's *always* true. - Because of this, we never took advantage of storing items' full path. This PR removes `ImportPath` and changes `ImportInfo` to only store items' name, which should reduce the memory consumption to some extent. - Removes `SearchMode::Contains` for `Query` because it's never used. - Merges `Query::assoc_items_only` and `Query::exclude_import_kinds` into `Query::assoc_mode`, because the latter is never used besides filtering associated items out. Best reviewed one commit at a time. I made sure each commit passes full test suite. I can squash the first three commits if needed. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |