diff options
Diffstat (limited to 'crates/hir_def/src/visibility.rs')
-rw-r--r-- | crates/hir_def/src/visibility.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/hir_def/src/visibility.rs b/crates/hir_def/src/visibility.rs index 83500f54e..aeb1e7726 100644 --- a/crates/hir_def/src/visibility.rs +++ b/crates/hir_def/src/visibility.rs | |||
@@ -172,9 +172,8 @@ impl Visibility { | |||
172 | /// visible in unrelated modules). | 172 | /// visible in unrelated modules). |
173 | pub(crate) fn max(self, other: Visibility, def_map: &DefMap) -> Option<Visibility> { | 173 | pub(crate) fn max(self, other: Visibility, def_map: &DefMap) -> Option<Visibility> { |
174 | match (self, other) { | 174 | match (self, other) { |
175 | (Visibility::Module(_), Visibility::Public) | 175 | (Visibility::Module(_) | Visibility::Public, Visibility::Public) |
176 | | (Visibility::Public, Visibility::Module(_)) | 176 | | (Visibility::Public, Visibility::Module(_)) => Some(Visibility::Public), |
177 | | (Visibility::Public, Visibility::Public) => Some(Visibility::Public), | ||
178 | (Visibility::Module(mod_a), Visibility::Module(mod_b)) => { | 177 | (Visibility::Module(mod_a), Visibility::Module(mod_b)) => { |
179 | if mod_a.krate != mod_b.krate { | 178 | if mod_a.krate != mod_b.krate { |
180 | return None; | 179 | return None; |