diff options
author | Lukas Wirth <[email protected]> | 2021-06-17 16:37:14 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-06-17 16:37:14 +0100 |
commit | 95c8c65139c10e4de44367fead8dff88511e6d46 (patch) | |
tree | 4326d46ee282c133123f3a08aaee7d640f007050 /crates/hir_def/src/visibility.rs | |
parent | c82a9141abe6b6cbf5b55710dc8a315a3839081b (diff) |
Nest all the or-patterns!
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; |