aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir/src/code_model.rs2
-rw-r--r--crates/ra_hir_def/src/item_scope.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 3f0ebca0d..cd2a8fc62 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -235,7 +235,7 @@ impl Module {
235 } 235 }
236 236
237 pub fn visibility_of(self, db: &dyn HirDatabase, def: &ModuleDef) -> Option<Visibility> { 237 pub fn visibility_of(self, db: &dyn HirDatabase, def: &ModuleDef) -> Option<Visibility> {
238 db.crate_def_map(self.id.krate)[self.id.local_id].scope.visbility_of(def.clone().into()) 238 db.crate_def_map(self.id.krate)[self.id.local_id].scope.visibility_of(def.clone().into())
239 } 239 }
240 240
241 pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) { 241 pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) {
diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs
index ef1aaba6f..259b9ff03 100644
--- a/crates/ra_hir_def/src/item_scope.rs
+++ b/crates/ra_hir_def/src/item_scope.rs
@@ -68,7 +68,7 @@ impl ItemScope {
68 self.impls.iter().copied() 68 self.impls.iter().copied()
69 } 69 }
70 70
71 pub fn visbility_of(&self, def: ModuleDefId) -> Option<Visibility> { 71 pub fn visibility_of(&self, def: ModuleDefId) -> Option<Visibility> {
72 self.name_of(ItemInNs::Types(def)) 72 self.name_of(ItemInNs::Types(def))
73 .or_else(|| self.name_of(ItemInNs::Values(def))) 73 .or_else(|| self.name_of(ItemInNs::Values(def)))
74 .map(|(_, v)| v) 74 .map(|(_, v)| v)