rust/crates
bors[bot] 0791c8e44c
Merge #7336
7336: Rename `CrateDefMap` to `DefMap` r=matklad a=jonas-schievink

I propose handling local items by computing a `DefMap` for every block expression, using the regular (early) name resolution algorithm. The result of that will be a `DefMap` that has a reference to the parent `DefMap`, which is either the one computed for the containing block expression, or the crate's root `DefMap`. Name resolution will fall back to a name in the parent `DefMap` if it cannot be resolved in the inner block.

The `DefMap`s computed for block expressions will go through a separate query that can be garbage-collected much more aggressively, since these `DefMap`s should be cheap to compute and are never part of a crate's public API.

The first step towards that is to make `CrateDefMap` not specific to crates anymore, hence this rename (if this plans sounds reasonable).

cc https://github.com/rust-analyzer/rust-analyzer/issues/7325 and https://github.com/rust-analyzer/rust-analyzer/issues/1165

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-18 20:12:11 +00:00
..
assists Merge #7297 #7338 2021-01-18 19:40:11 +00:00
base_db Better fixture highlight 2021-01-07 19:11:27 +03:00
cfg Upgrade expect-test to 1.1 2021-01-03 14:43:29 +01:00
completion Merge #7339 2021-01-18 19:54:40 +00:00
flycheck Unfreeze cargo_metadata 2021-01-11 08:27:16 -05:00
hir Add flyimport completion for trait assoc items 2021-01-16 20:44:12 +02:00
hir_def Merge #7336 2021-01-18 20:12:11 +00:00
hir_expand shrink_to_fit TokenMap's backing storage 2021-01-18 18:40:06 +01:00
hir_ty Rename CrateDefMap to DefMap 2021-01-18 20:18:05 +01:00
ide Merge #7297 #7338 2021-01-18 19:40:11 +00:00
ide_db Merge #7297 #7338 2021-01-18 19:40:11 +00:00
mbe shrink_to_fit TokenMap's backing storage 2021-01-18 18:40:06 +01:00
parser Parse impl const Trait 2021-01-18 20:18:02 +01:00
paths Add description for crates that will be published 2020-08-24 13:07:22 +02:00
proc_macro_api Enable serde_json unbounded_depth feature 2021-01-18 14:04:20 +02:00
proc_macro_srv cargo update 2021-01-18 13:13:24 -05:00
proc_macro_test Add description for crates that will be published 2020-08-24 13:07:22 +02:00
profile Add back jemalloc support 2021-01-18 19:39:46 +01:00
project_model Avoid blocking the main loop when editing Cargo.toml 2021-01-18 14:52:12 +03:00
rust-analyzer Merge #7297 #7338 2021-01-18 19:40:11 +00:00
ssr Phase out SourceFileEdits in favour of a plain HashMap 2021-01-14 22:43:36 +01:00
stdx Fix assert_never invoking assert_always 2021-01-14 22:43:09 +01:00
syntax Parse impl const Trait 2021-01-18 20:18:02 +01:00
test_utils Fixed typos in code comments 2021-01-09 15:41:29 +01:00
text_edit Avoid turning completion objects into builders 2020-11-16 23:16:41 +02:00
toolchain Add description for crates that will be published 2020-08-24 13:07:22 +02:00
tt Refactor TokenBuffer for reduc cloning 2021-01-05 02:00:46 +08:00
vfs Document vfs private items 2021-01-12 18:01:47 +01:00
vfs-notify Follow symlinks when walking project trees 2020-10-15 14:22:36 -04:00