aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src')
-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 ebbc37c0e..32f98e394 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -390,6 +390,10 @@ impl Union {
390 self.id.module(db) 390 self.id.module(db)
391 } 391 }
392 392
393 pub fn ty(self, db: &impl HirDatabase) -> Ty {
394 db.type_for_def(self.into(), Namespace::Types)
395 }
396
393 // FIXME move to a more general type 397 // FIXME move to a more general type
394 /// Builds a resolver for type references inside this union. 398 /// Builds a resolver for type references inside this union.
395 pub(crate) fn resolver(self, db: &impl HirDatabase) -> Resolver { 399 pub(crate) fn resolver(self, db: &impl HirDatabase) -> Resolver {