rust-analyzer/crates/hir-def/src
bors 691600a885 Auto merge of #15181 - lowr:patch/import-map-purge-unused, r=Veykril
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.
2023-07-03 14:37:55 +00:00
..
attr Merge remote-tracking branch 'upstream/master' into sync-from-rust 2023-06-05 11:07:47 +03:00
body Use anonymous lifetime where possible 2023-06-29 23:27:28 +09:00
data Fix layout of simd types and respect align in mir interpreter 2023-07-02 00:42:33 +03:30
dyn_map HIR ExternCrateDecl 2023-06-19 14:15:08 +02:00
hir Use ConstArg instead of Expr for AstId of InTypeConstId 2023-06-11 00:39:28 +03:30
item_tree Use anonymous lifetime where possible 2023-06-29 23:27:28 +09:00
macro_expansion_tests Don't diagnose builtin derives 2023-07-03 14:23:36 +02:00
nameres Refactor 2023-06-27 16:01:07 +09:00
path Use ConstArg instead of Expr for AstId of InTypeConstId 2023-06-11 00:39:28 +03:30
attr.rs Fix runnable detection for #[tokio::test] 2023-06-28 23:31:08 +03:30
body.rs Shrink size of hir::Binding 2023-06-18 12:03:04 +02:00
builtin_type.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
child_by_source.rs Slightly shrink DefMap 2023-06-01 14:46:36 +02:00
data.rs HIR ExternCrateDecl 2023-06-19 14:15:08 +02:00
db.rs HIR ExternCrateDecl 2023-06-19 14:15:08 +02:00
dyn_map.rs Move hir_def::keys to hir_def::dyn_map 2023-04-06 19:49:33 +02:00
expander.rs Lower const params with a bad id 2023-06-11 00:39:28 +03:30
find_path.rs Only store item name instead of full path 2023-07-01 00:17:57 +09:00
generics.rs Consider macro sub-namespace during name resolution 2023-05-11 21:13:12 +09:00
hir.rs Shrink size of hir::Binding 2023-06-18 12:03:04 +02:00
import_map.rs Restructure ImportMap collection 2023-07-01 00:18:23 +09:00
item_scope.rs HIR ExternCrateDecl 2023-06-19 14:15:08 +02:00
item_tree.rs internal: Add a CrateRootModuleId that encodes a module id that is always a crate root 2023-06-14 15:41:06 +02:00
lang_item.rs Fix cstring literals construct &CStr not &str 2023-05-18 12:03:15 +02:00
lib.rs Refactor 2023-06-27 16:01:07 +09:00
lower.rs Use triomphe Arc 2023-05-02 20:02:43 +03:00
nameres.rs Fix self and super path resolution in block modules 2023-06-27 15:29:08 +09:00
path.rs Lower const params with a bad id 2023-06-11 00:39:28 +03:30
per_ns.rs ⬆️ rust-analyzer 2022-08-23 10:05:52 +03:00
pretty.rs internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
resolver.rs HIR ExternCrateDecl 2023-06-19 14:15:08 +02:00
src.rs Option begone part 2 2023-04-16 19:20:48 +02:00
test_db.rs Slightly shrink DefMap 2023-06-01 14:46:36 +02:00
trace.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
visibility.rs Use triomphe Arc 2023-05-02 20:02:43 +03:00