Make hygiene private to hir

This commit is contained in:
Aleksey Kladov 2020-08-13 23:52:14 +02:00
parent 9930ef2536
commit 9664c57e60
4 changed files with 39 additions and 16 deletions

View file

@ -883,6 +883,13 @@ where
}
impl AssocItem {
pub fn name(self, db: &dyn HirDatabase) -> Option<Name> {
match self {
AssocItem::Function(it) => Some(it.name(db)),
AssocItem::Const(it) => it.name(db),
AssocItem::TypeAlias(it) => Some(it.name(db)),
}
}
pub fn module(self, db: &dyn HirDatabase) -> Module {
match self {
AssocItem::Function(f) => f.module(db),