From 29f93a79069cf929fbc6d4efa194a0ab18bb1f45 Mon Sep 17 00:00:00 2001 From: Ville Penttinen Date: Mon, 25 Feb 2019 10:21:01 +0200 Subject: Add static type inference --- crates/ra_hir/src/code_model_api.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crates/ra_hir/src/code_model_api.rs') diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index 9efd902fa..d668b883c 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs @@ -612,6 +612,16 @@ impl Static { pub fn module(&self, db: &impl PersistentHirDatabase) -> Module { self.id.module(db) } + + pub fn signature(&self, db: &impl HirDatabase) -> Arc { + db.static_signature(*self) + } + + /// Builds a resolver for code inside this item. + pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { + // take the outer scope... + self.module(db).resolver(db) + } } impl Docs for Static { -- cgit v1.2.3