Split ty.rs into several modules

It was just getting too big. We now have:

 - ty: the `Ty` enum and helpers
 - ty::infer: actual type inference
 - ty::lower: lowering from HIR to `Ty`
 - ty::op: helpers for binary operations, currently
This commit is contained in:
Florian Diebold 2019-02-23 15:24:07 +01:00
parent 460ceb4cf2
commit dcfb4ee702
5 changed files with 1500 additions and 1450 deletions

View file

@ -483,6 +483,10 @@ impl Function {
db.body_hir(*self)
}
pub fn ty(&self, db: &impl HirDatabase) -> Ty {
db.type_for_def((*self).into(), Namespace::Values)
}
pub fn scopes(&self, db: &impl HirDatabase) -> ScopesWithSyntaxMapping {
let scopes = db.expr_scopes(*self);
let syntax_mapping = db.body_syntax_mapping(*self);