mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Resolve paths to defs (functions currently) during type inference
This commit is contained in:
parent
93ffbf80c6
commit
ef67581104
17 changed files with 215 additions and 87 deletions
|
@ -94,6 +94,7 @@ salsa::database_storage! {
|
|||
fn fn_syntax() for hir::db::FnSyntaxQuery;
|
||||
fn submodules() for hir::db::SubmodulesQuery;
|
||||
fn infer() for hir::db::InferQuery;
|
||||
fn type_for_def() for hir::db::TypeForDefQuery;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -524,7 +524,7 @@ impl AnalysisImpl {
|
|||
let function = ctry!(source_binder::function_from_source(
|
||||
&*self.db, file_id, parent_fn
|
||||
)?);
|
||||
let infer = function.infer(&*self.db);
|
||||
let infer = function.infer(&*self.db)?;
|
||||
Ok(infer.type_of_node(node).map(|t| t.to_string()))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue