aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/lang_item.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/lang_item.rs')
-rw-r--r--crates/ra_hir_def/src/lang_item.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/lang_item.rs b/crates/ra_hir_def/src/lang_item.rs
index f15c23db9..f4fdbdcfc 100644
--- a/crates/ra_hir_def/src/lang_item.rs
+++ b/crates/ra_hir_def/src/lang_item.rs
@@ -41,7 +41,7 @@ impl LangItems {
41 crate_def_map 41 crate_def_map
42 .modules 42 .modules
43 .iter() 43 .iter()
44 .filter_map(|(module_id, _)| db.module_lang_items(ModuleId { krate, module_id })) 44 .filter_map(|(local_id, _)| db.module_lang_items(ModuleId { krate, local_id }))
45 .for_each(|it| lang_items.items.extend(it.items.iter().map(|(k, v)| (k.clone(), *v)))); 45 .for_each(|it| lang_items.items.extend(it.items.iter().map(|(k, v)| (k.clone(), *v))));
46 46
47 Arc::new(lang_items) 47 Arc::new(lang_items)
@@ -80,7 +80,7 @@ impl LangItems {
80 fn collect_lang_items(&mut self, db: &impl DefDatabase, module: ModuleId) { 80 fn collect_lang_items(&mut self, db: &impl DefDatabase, module: ModuleId) {
81 // Look for impl targets 81 // Look for impl targets
82 let def_map = db.crate_def_map(module.krate); 82 let def_map = db.crate_def_map(module.krate);
83 let module_data = &def_map[module.module_id]; 83 let module_data = &def_map[module.local_id];
84 for &impl_block in module_data.impls.iter() { 84 for &impl_block in module_data.impls.iter() {
85 self.collect_lang_item(db, impl_block, LangItemTarget::ImplBlockId) 85 self.collect_lang_item(db, impl_block, LangItemTarget::ImplBlockId)
86 } 86 }