Add static type inference

This commit is contained in:
Ville Penttinen 2019-02-25 10:21:01 +02:00
parent 18b0bd9bff
commit 29f93a7906
6 changed files with 54 additions and 12 deletions

View file

@ -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<ConstSignature> {
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 {