Add beginnings of type infrastructure

This commit is contained in:
Florian Diebold
2018-12-20 21:56:28 +01:00
parent d77520fde3
commit 3ac605e687
11 changed files with 689 additions and 15 deletions

View File

@@ -10,7 +10,7 @@ use ra_syntax::{
ast::{self, AstNode, DocCommentsOwner, NameOwner},
};
use crate::{ DefId, HirDatabase };
use crate::{ DefId, HirDatabase, ty::InferenceResult };
pub use self::scope::FnScopes;
@@ -35,6 +35,10 @@ impl Function {
let syntax = db.fn_syntax(self.fn_id);
FnSignatureInfo::new(syntax.borrowed())
}
pub fn infer(&self, db: &impl HirDatabase) -> Arc<InferenceResult> {
db.infer(self.fn_id)
}
}
#[derive(Debug, Clone)]