aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/code_model.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 32f98e394..75914ccb0 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -849,6 +849,10 @@ impl TypeAlias {
849 db.type_alias_data(self).type_ref.clone() 849 db.type_alias_data(self).type_ref.clone()
850 } 850 }
851 851
852 pub fn ty(self, db: &impl HirDatabase) -> Ty {
853 db.type_for_def(self.into(), Namespace::Types)
854 }
855
852 pub fn name(self, db: &impl DefDatabase) -> Name { 856 pub fn name(self, db: &impl DefDatabase) -> Name {
853 db.type_alias_data(self).name.clone() 857 db.type_alias_data(self).name.clone()
854 } 858 }