diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-23 17:06:57 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-23 17:06:57 +0000 |
commit | 0d5a9e4104a88df341480aa05d1c8976996e6e13 (patch) | |
tree | 55290349625c8516fbb8fd24f7fa22582a57d35a /crates/hir_def/src/nameres | |
parent | e837fb245aadf2dcfda51a17a6c19b5efd47dc42 (diff) | |
parent | 338823f73aefbf7957b928ad76fc5f55cc43df9c (diff) |
Merge #7768
7768: Fix visibility computation when inside a block expression r=jonas-schievink a=jonas-schievink
fixes https://github.com/rust-analyzer/rust-analyzer/issues/7728
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
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 6bd41bc08..9996a0807 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs | |||
@@ -608,7 +608,7 @@ impl DefCollector<'_> { | |||
608 | ( | 608 | ( |
609 | n, | 609 | n, |
610 | res.filter_visibility(|v| { | 610 | res.filter_visibility(|v| { |
611 | v.is_visible_from_def_map(&self.def_map, module_id) | 611 | v.is_visible_from_def_map(self.db, &self.def_map, module_id) |
612 | }), | 612 | }), |
613 | ) | 613 | ) |
614 | }) | 614 | }) |
@@ -761,7 +761,7 @@ impl DefCollector<'_> { | |||
761 | .filter(|(glob_importing_module, _)| { | 761 | .filter(|(glob_importing_module, _)| { |
762 | // we know all resolutions have the same visibility (`vis`), so we | 762 | // we know all resolutions have the same visibility (`vis`), so we |
763 | // just need to check that once | 763 | // just need to check that once |
764 | vis.is_visible_from_def_map(&self.def_map, *glob_importing_module) | 764 | vis.is_visible_from_def_map(self.db, &self.def_map, *glob_importing_module) |
765 | }) | 765 | }) |
766 | .cloned() | 766 | .cloned() |
767 | .collect::<Vec<_>>(); | 767 | .collect::<Vec<_>>(); |