fix typo of visibility_of

This commit is contained in:
Edwin Cheng 2020-03-26 00:11:38 +08:00
parent 0f6fb0ec3b
commit 07ec31813c
2 changed files with 2 additions and 2 deletions

View file

@ -235,7 +235,7 @@ impl Module {
}
pub fn visibility_of(self, db: &dyn HirDatabase, def: &ModuleDef) -> Option<Visibility> {
db.crate_def_map(self.id.krate)[self.id.local_id].scope.visbility_of(def.clone().into())
db.crate_def_map(self.id.krate)[self.id.local_id].scope.visibility_of(def.clone().into())
}
pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) {

View file

@ -68,7 +68,7 @@ impl ItemScope {
self.impls.iter().copied()
}
pub fn visbility_of(&self, def: ModuleDefId) -> Option<Visibility> {
pub fn visibility_of(&self, def: ModuleDefId) -> Option<Visibility> {
self.name_of(ItemInNs::Types(def))
.or_else(|| self.name_of(ItemInNs::Values(def)))
.map(|(_, v)| v)