mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-27 12:25:05 +00:00
fix typo of visibility_of
This commit is contained in:
parent
0f6fb0ec3b
commit
07ec31813c
2 changed files with 2 additions and 2 deletions
|
@ -235,7 +235,7 @@ impl Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn visibility_of(self, db: &dyn HirDatabase, def: &ModuleDef) -> Option<Visibility> {
|
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) {
|
pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) {
|
||||||
|
|
|
@ -68,7 +68,7 @@ impl ItemScope {
|
||||||
self.impls.iter().copied()
|
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))
|
self.name_of(ItemInNs::Types(def))
|
||||||
.or_else(|| self.name_of(ItemInNs::Values(def)))
|
.or_else(|| self.name_of(ItemInNs::Values(def)))
|
||||||
.map(|(_, v)| v)
|
.map(|(_, v)| v)
|
||||||
|
|
Loading…
Reference in a new issue