mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Make hygiene private to hir
This commit is contained in:
parent
9930ef2536
commit
9664c57e60
4 changed files with 39 additions and 16 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue