aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src/apply_change.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-21 15:28:40 +0000
committerGitHub <[email protected]>2021-01-21 15:28:40 +0000
commit47a70aadcedbcf28ad6d1ea59b77bf0e11493de0 (patch)
treee5f494422dacc1a6bcae2b696d06f937b64d9163 /crates/ide_db/src/apply_change.rs
parent323138f32ea74cfe9f5381e9e170cf87e7592818 (diff)
parentec4a1dc297eb90dde4c22c682a35606aaa50b4d4 (diff)
Merge #7375
7375: Add support for running name resolution in block expressions r=jonas-schievink a=jonas-schievink This adds a `block_def_map` query that runs the name resolution algorithm on a block expression, and returns a `DefMap` that stores links to the parent `DefMap` (either the containing block or the crate-level `DefMap`). Blocks with no inner items return the parent's `DefMap` as-is, to avoid creating unnecessarily long `DefMap` chains. Path resolution is updated to recurse into the parent `DefMap` after looking up a path in the original `DefMap`. I've added a few new tests for this, but outside of those this isn't used yet. bors r+ Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/ide_db/src/apply_change.rs')
-rw-r--r--crates/ide_db/src/apply_change.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ide_db/src/apply_change.rs b/crates/ide_db/src/apply_change.rs
index c770a236b..9d9b6de7a 100644
--- a/crates/ide_db/src/apply_change.rs
+++ b/crates/ide_db/src/apply_change.rs
@@ -149,6 +149,7 @@ impl RootDatabase {
149 149
150 // DefDatabase 150 // DefDatabase
151 hir::db::ItemTreeQuery 151 hir::db::ItemTreeQuery
152 hir::db::BlockDefMapQuery
152 hir::db::CrateDefMapQueryQuery 153 hir::db::CrateDefMapQueryQuery
153 hir::db::StructDataQuery 154 hir::db::StructDataQuery
154 hir::db::UnionDataQuery 155 hir::db::UnionDataQuery