diff options
Diffstat (limited to 'crates/hir_def/src/nameres/collector.rs')
-rw-r--r-- | crates/hir_def/src/nameres/collector.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs index fcc8e2607..6e86cc4a7 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs | |||
@@ -592,7 +592,13 @@ impl DefCollector<'_> { | |||
592 | // glob import from same crate => we do an initial | 592 | // glob import from same crate => we do an initial |
593 | // import, and then need to propagate any further | 593 | // import, and then need to propagate any further |
594 | // additions | 594 | // additions |
595 | let scope = &self.def_map[m.local_id].scope; | 595 | let def_map; |
596 | let scope = if m.block == self.def_map.block_id() { | ||
597 | &self.def_map[m.local_id].scope | ||
598 | } else { | ||
599 | def_map = m.def_map(self.db); | ||
600 | &def_map[m.local_id].scope | ||
601 | }; | ||
596 | 602 | ||
597 | // Module scoped macros is included | 603 | // Module scoped macros is included |
598 | let items = scope | 604 | let items = scope |