mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Merge #3723
3723: Fix typo of visibility_of r=edwin0cheng a=edwin0cheng cc @kjeremy Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
This commit is contained in:
commit
3d38d4dc94
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> {
|
||||
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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue