Add beginnings of type infrastructure
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user