From 546442df68bcb62e7ff4bc7356c6a003052304da Mon Sep 17 00:00:00 2001 From: Shotaro Yamada Date: Wed, 3 Jul 2019 03:08:39 +0900 Subject: Add completion for type aliases --- crates/ra_hir/src/code_model.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_hir') 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 { db.type_alias_data(self).type_ref.clone() } + pub fn ty(self, db: &impl HirDatabase) -> Ty { + db.type_for_def(self.into(), Namespace::Types) + } + pub fn name(self, db: &impl DefDatabase) -> Name { db.type_alias_data(self).name.clone() } -- cgit v1.2.3