diff options
Diffstat (limited to 'crates/hir_def/src/visibility.rs')
-rw-r--r-- | crates/hir_def/src/visibility.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_def/src/visibility.rs b/crates/hir_def/src/visibility.rs index f3bc9d680..e79a91102 100644 --- a/crates/hir_def/src/visibility.rs +++ b/crates/hir_def/src/visibility.rs | |||
@@ -5,7 +5,7 @@ use syntax::ast; | |||
5 | 5 | ||
6 | use crate::{ | 6 | use crate::{ |
7 | db::DefDatabase, | 7 | db::DefDatabase, |
8 | nameres::CrateDefMap, | 8 | nameres::DefMap, |
9 | path::{ModPath, PathKind}, | 9 | path::{ModPath, PathKind}, |
10 | ModuleId, | 10 | ModuleId, |
11 | }; | 11 | }; |
@@ -103,7 +103,7 @@ impl Visibility { | |||
103 | if from_module.krate != to_module.krate { | 103 | if from_module.krate != to_module.krate { |
104 | return false; | 104 | return false; |
105 | } | 105 | } |
106 | let def_map = db.crate_def_map(from_module.krate); | 106 | let def_map = from_module.def_map(db); |
107 | self.is_visible_from_def_map(&def_map, from_module.local_id) | 107 | self.is_visible_from_def_map(&def_map, from_module.local_id) |
108 | } | 108 | } |
109 | 109 | ||
@@ -116,7 +116,7 @@ impl Visibility { | |||
116 | 116 | ||
117 | pub(crate) fn is_visible_from_def_map( | 117 | pub(crate) fn is_visible_from_def_map( |
118 | self, | 118 | self, |
119 | def_map: &CrateDefMap, | 119 | def_map: &DefMap, |
120 | from_module: crate::LocalModuleId, | 120 | from_module: crate::LocalModuleId, |
121 | ) -> bool { | 121 | ) -> bool { |
122 | let to_module = match self { | 122 | let to_module = match self { |
@@ -135,7 +135,7 @@ impl Visibility { | |||
135 | /// | 135 | /// |
136 | /// If there is no subset relation between `self` and `other`, returns `None` (ie. they're only | 136 | /// If there is no subset relation between `self` and `other`, returns `None` (ie. they're only |
137 | /// visible in unrelated modules). | 137 | /// visible in unrelated modules). |
138 | pub(crate) fn max(self, other: Visibility, def_map: &CrateDefMap) -> Option<Visibility> { | 138 | pub(crate) fn max(self, other: Visibility, def_map: &DefMap) -> Option<Visibility> { |
139 | match (self, other) { | 139 | match (self, other) { |
140 | (Visibility::Module(_), Visibility::Public) | 140 | (Visibility::Module(_), Visibility::Public) |
141 | | (Visibility::Public, Visibility::Module(_)) | 141 | | (Visibility::Public, Visibility::Module(_)) |