diff options
Diffstat (limited to 'crates/hir_def/src/nameres')
-rw-r--r-- | crates/hir_def/src/nameres/collector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs index 927a7b6e8..634e02205 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs | |||
@@ -1506,7 +1506,7 @@ impl ModCollector<'_, '_> { | |||
1506 | } | 1506 | } |
1507 | 1507 | ||
1508 | if let Some(DefData { id, name, visibility, has_constructor }) = def { | 1508 | if let Some(DefData { id, name, visibility, has_constructor }) = def { |
1509 | self.def_collector.def_map.modules[self.module_id].scope.define_def(id); | 1509 | self.def_collector.def_map.modules[self.module_id].scope.declare(id); |
1510 | let vis = self | 1510 | let vis = self |
1511 | .def_collector | 1511 | .def_collector |
1512 | .def_map | 1512 | .def_map |
@@ -1627,7 +1627,7 @@ impl ModCollector<'_, '_> { | |||
1627 | modules[self.module_id].children.insert(name.clone(), res); | 1627 | modules[self.module_id].children.insert(name.clone(), res); |
1628 | let module = self.def_collector.def_map.module_id(res); | 1628 | let module = self.def_collector.def_map.module_id(res); |
1629 | let def: ModuleDefId = module.into(); | 1629 | let def: ModuleDefId = module.into(); |
1630 | self.def_collector.def_map.modules[self.module_id].scope.define_def(def); | 1630 | self.def_collector.def_map.modules[self.module_id].scope.declare(def); |
1631 | self.def_collector.update( | 1631 | self.def_collector.update( |
1632 | self.module_id, | 1632 | self.module_id, |
1633 | &[(Some(name), PerNs::from_def(def, vis, false))], | 1633 | &[(Some(name), PerNs::from_def(def, vis, false))], |