diff options
author | Aleksey Kladov <[email protected]> | 2019-12-22 14:21:48 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-22 14:21:48 +0000 |
commit | 2c60f42825e68d8133854d378d9550139c71d9b4 (patch) | |
tree | 758ae7afaa82f127f7967e53dcd373092aa9fc81 /crates/ra_hir_def/src/nameres/collector.rs | |
parent | e69af8596262931f8e55b7f9203f65d14827e2d8 (diff) |
Separate defs from imports
Diffstat (limited to 'crates/ra_hir_def/src/nameres/collector.rs')
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 2 |
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 | } |