mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
![]() 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. |
||
---|---|---|
.. | ||
attr | ||
body | ||
data | ||
dyn_map | ||
hir | ||
item_tree | ||
macro_expansion_tests | ||
nameres | ||
path | ||
attr.rs | ||
body.rs | ||
builtin_type.rs | ||
child_by_source.rs | ||
data.rs | ||
db.rs | ||
dyn_map.rs | ||
expander.rs | ||
find_path.rs | ||
generics.rs | ||
hir.rs | ||
import_map.rs | ||
item_scope.rs | ||
item_tree.rs | ||
lang_item.rs | ||
lib.rs | ||
lower.rs | ||
nameres.rs | ||
path.rs | ||
per_ns.rs | ||
pretty.rs | ||
resolver.rs | ||
src.rs | ||
test_db.rs | ||
trace.rs | ||
visibility.rs |