aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-03-13 01:24:26 +0000
committerJonas Schievink <[email protected]>2021-03-18 00:53:37 +0000
commit5fbb97a0f0b78edd8f602e46c6a336b5a1aac7ae (patch)
tree01c2914d7c92a91c70282b3be19f955c83aa1431 /crates/hir_def/src/nameres
parent759f8c83e53bb72804cb4c578a01b09fc2dcf4fa (diff)
Rename `item_tree` query to `file_item_tree`
Diffstat (limited to 'crates/hir_def/src/nameres')
-rw-r--r--crates/hir_def/src/nameres/collector.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs
index 7ca4299b9..d0fefb5af 100644
--- a/crates/hir_def/src/nameres/collector.rs
+++ b/crates/hir_def/src/nameres/collector.rs
@@ -242,7 +242,7 @@ struct DefCollector<'a> {
242impl DefCollector<'_> { 242impl DefCollector<'_> {
243 fn seed_with_top_level(&mut self) { 243 fn seed_with_top_level(&mut self) {
244 let file_id = self.db.crate_graph()[self.def_map.krate].root_file_id; 244 let file_id = self.db.crate_graph()[self.def_map.krate].root_file_id;
245 let item_tree = self.db.item_tree(file_id.into()); 245 let item_tree = self.db.file_item_tree(file_id.into());
246 let module_id = self.def_map.root; 246 let module_id = self.def_map.root;
247 self.def_map.modules[module_id].origin = ModuleOrigin::CrateRoot { definition: file_id }; 247 self.def_map.modules[module_id].origin = ModuleOrigin::CrateRoot { definition: file_id };
248 if item_tree 248 if item_tree
@@ -263,7 +263,7 @@ impl DefCollector<'_> {
263 } 263 }
264 264
265 fn seed_with_inner(&mut self, block: AstId<ast::BlockExpr>) { 265 fn seed_with_inner(&mut self, block: AstId<ast::BlockExpr>) {
266 let item_tree = self.db.item_tree(block.file_id); 266 let item_tree = self.db.file_item_tree(block.file_id);
267 let module_id = self.def_map.root; 267 let module_id = self.def_map.root;
268 self.def_map.modules[module_id].origin = ModuleOrigin::BlockExpr { block }; 268 self.def_map.modules[module_id].origin = ModuleOrigin::BlockExpr { block };
269 if item_tree 269 if item_tree
@@ -895,7 +895,7 @@ impl DefCollector<'_> {
895 } 895 }
896 896
897 // Then, fetch and process the item tree. This will reuse the expansion result from above. 897 // Then, fetch and process the item tree. This will reuse the expansion result from above.
898 let item_tree = self.db.item_tree(file_id); 898 let item_tree = self.db.file_item_tree(file_id);
899 let mod_dir = self.mod_dirs[&module_id].clone(); 899 let mod_dir = self.mod_dirs[&module_id].clone();
900 ModCollector { 900 ModCollector {
901 def_collector: &mut *self, 901 def_collector: &mut *self,
@@ -1299,7 +1299,7 @@ impl ModCollector<'_, '_> {
1299 Some((file_id, is_mod_rs)), 1299 Some((file_id, is_mod_rs)),
1300 &self.item_tree[module.visibility], 1300 &self.item_tree[module.visibility],
1301 ); 1301 );
1302 let item_tree = db.item_tree(file_id.into()); 1302 let item_tree = db.file_item_tree(file_id.into());
1303 ModCollector { 1303 ModCollector {
1304 def_collector: &mut *self.def_collector, 1304 def_collector: &mut *self.def_collector,
1305 macro_depth: self.macro_depth, 1305 macro_depth: self.macro_depth,