aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-18 00:57:48 +0000
committerGitHub <[email protected]>2021-03-18 00:57:48 +0000
commitd704750ba982153d92ccff90cf236121641b9da3 (patch)
tree01c2914d7c92a91c70282b3be19f955c83aa1431 /crates/hir_def/src/nameres.rs
parent5632e61f79ff8827816ccfab9f01ce2e349f3144 (diff)
parent5fbb97a0f0b78edd8f602e46c6a336b5a1aac7ae (diff)
Merge #8080
8080: Change ItemTree API to accomodate creating an ItemTree per block expression r=jonas-schievink a=jonas-schievink ...which won't go through salsa because the AST is already cached anyways bors r+ Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_def/src/nameres.rs')
-rw-r--r--crates/hir_def/src/nameres.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/nameres.rs b/crates/hir_def/src/nameres.rs
index 003d668ca..c97be584e 100644
--- a/crates/hir_def/src/nameres.rs
+++ b/crates/hir_def/src/nameres.rs
@@ -213,7 +213,7 @@ impl DefMap {
213 ) -> Option<Arc<DefMap>> { 213 ) -> Option<Arc<DefMap>> {
214 let block: BlockLoc = db.lookup_intern_block(block_id); 214 let block: BlockLoc = db.lookup_intern_block(block_id);
215 215
216 let item_tree = db.item_tree(block.ast_id.file_id); 216 let item_tree = db.file_item_tree(block.ast_id.file_id);
217 if item_tree.inner_items_of_block(block.ast_id.value).is_empty() { 217 if item_tree.inner_items_of_block(block.ast_id.value).is_empty() {
218 return None; 218 return None;
219 } 219 }