aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres/collector.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/nameres/collector.rs')
-rw-r--r--crates/hir_def/src/nameres/collector.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs
index adfb78c94..cebc2dc40 100644
--- a/crates/hir_def/src/nameres/collector.rs
+++ b/crates/hir_def/src/nameres/collector.rs
@@ -481,6 +481,10 @@ impl DefCollector<'_> {
481 let res = self.def_map.resolve_name_in_extern_prelude(self.db, &extern_crate.name); 481 let res = self.def_map.resolve_name_in_extern_prelude(self.db, &extern_crate.name);
482 482
483 if let Some(ModuleDefId::ModuleId(m)) = res.take_types() { 483 if let Some(ModuleDefId::ModuleId(m)) = res.take_types() {
484 if m == self.def_map.module_id(current_module_id) {
485 return;
486 }
487
484 cov_mark::hit!(macro_rules_from_other_crates_are_visible_with_macro_use); 488 cov_mark::hit!(macro_rules_from_other_crates_are_visible_with_macro_use);
485 self.import_all_macros_exported(current_module_id, m.krate); 489 self.import_all_macros_exported(current_module_id, m.krate);
486 } 490 }