diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-13 23:16:31 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-13 23:16:31 +0100 |
commit | f1f73649a686dc6e6449afc35e0fa6fed00e225d (patch) | |
tree | a62d88ce37b64507b708f8cdc86c8ff3602a42bc /crates/hir/src/code_model.rs | |
parent | 9930ef253634465e2fe25b47b469e4c3bbcf6df1 (diff) | |
parent | 9664c57e60ec5662b3e8b063324d9ab7879d5570 (diff) |
Merge #5755
5755: Make hygiene private to hir r=davidlattimore a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/hir/src/code_model.rs')
-rw-r--r-- | crates/hir/src/code_model.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index 8ffb9e99b..5dc3ae3b1 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs | |||
@@ -883,6 +883,13 @@ where | |||
883 | } | 883 | } |
884 | 884 | ||
885 | impl AssocItem { | 885 | impl AssocItem { |
886 | pub fn name(self, db: &dyn HirDatabase) -> Option<Name> { | ||
887 | match self { | ||
888 | AssocItem::Function(it) => Some(it.name(db)), | ||
889 | AssocItem::Const(it) => it.name(db), | ||
890 | AssocItem::TypeAlias(it) => Some(it.name(db)), | ||
891 | } | ||
892 | } | ||
886 | pub fn module(self, db: &dyn HirDatabase) -> Module { | 893 | pub fn module(self, db: &dyn HirDatabase) -> Module { |
887 | match self { | 894 | match self { |
888 | AssocItem::Function(f) => f.module(db), | 895 | AssocItem::Function(f) => f.module(db), |