mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
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:
parent
460ceb4cf2
commit
dcfb4ee702
5 changed files with 1500 additions and 1450 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue