aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/nameres')
-rw-r--r--crates/ra_hir_def/src/nameres/collector.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs
index b4e438257..745e31c0d 100644
--- a/crates/ra_hir_def/src/nameres/collector.rs
+++ b/crates/ra_hir_def/src/nameres/collector.rs
@@ -716,6 +716,7 @@ where
716 modules[self.module_id].children.insert(name.clone(), res); 716 modules[self.module_id].children.insert(name.clone(), res);
717 let module = ModuleId { krate: self.def_collector.def_map.krate, local_id: res }; 717 let module = ModuleId { krate: self.def_collector.def_map.krate, local_id: res };
718 let def: ModuleDefId = module.into(); 718 let def: ModuleDefId = module.into();
719 self.def_collector.def_map.modules[self.module_id].scope.define_def(def);
719 let resolution = Resolution { def: def.into(), import: false }; 720 let resolution = Resolution { def: def.into(), import: false };
720 self.def_collector.update(self.module_id, None, &[(name, resolution)]); 721 self.def_collector.update(self.module_id, None, &[(name, resolution)]);
721 res 722 res
@@ -775,6 +776,7 @@ where
775 .intern(self.def_collector.db) 776 .intern(self.def_collector.db)
776 .into(), 777 .into(),
777 }; 778 };
779 self.def_collector.def_map.modules[self.module_id].scope.define_def(def);
778 let resolution = Resolution { def: def.into(), import: false }; 780 let resolution = Resolution { def: def.into(), import: false };
779 self.def_collector.update(self.module_id, None, &[(name, resolution)]) 781 self.def_collector.update(self.module_id, None, &[(name, resolution)])
780 } 782 }