diff options
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index e55cc1e55..99ac730ba 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs | |||
@@ -609,14 +609,15 @@ impl DefCollector<'_> { | |||
609 | .get(&module_id) | 609 | .get(&module_id) |
610 | .into_iter() | 610 | .into_iter() |
611 | .flat_map(|v| v.iter()) | 611 | .flat_map(|v| v.iter()) |
612 | .filter(|(glob_importing_module, _)| { | ||
613 | // we know all resolutions have the same visibility (`vis`), so we | ||
614 | // just need to check that once | ||
615 | vis.is_visible_from_def_map(&self.def_map, *glob_importing_module) | ||
616 | }) | ||
612 | .cloned() | 617 | .cloned() |
613 | .collect::<Vec<_>>(); | 618 | .collect::<Vec<_>>(); |
619 | |||
614 | for (glob_importing_module, glob_import_vis) in glob_imports { | 620 | for (glob_importing_module, glob_import_vis) in glob_imports { |
615 | // we know all resolutions have the same visibility (`vis`), so we | ||
616 | // just need to check that once | ||
617 | if !vis.is_visible_from_def_map(&self.def_map, glob_importing_module) { | ||
618 | continue; | ||
619 | } | ||
620 | self.update_recursive( | 621 | self.update_recursive( |
621 | glob_importing_module, | 622 | glob_importing_module, |
622 | resolutions, | 623 | resolutions, |