aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2018-12-23 16:13:11 +0000
committerFlorian Diebold <[email protected]>2018-12-23 16:13:11 +0000
commitef67581104eb00a0c199f0b2a3b558da8a6f90a2 (patch)
treeb6cf180b26152fa06ec4b2d02e22221fb7ba7fad /crates/ra_analysis
parent93ffbf80c632a7d38fc8bbdf6357bfd26a96a35a (diff)
Resolve paths to defs (functions currently) during type inference
Diffstat (limited to 'crates/ra_analysis')
-rw-r--r--crates/ra_analysis/src/db.rs1
-rw-r--r--crates/ra_analysis/src/imp.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs
index f26c49887..780a84291 100644
--- a/crates/ra_analysis/src/db.rs
+++ b/crates/ra_analysis/src/db.rs
@@ -94,6 +94,7 @@ salsa::database_storage! {
94 fn fn_syntax() for hir::db::FnSyntaxQuery; 94 fn fn_syntax() for hir::db::FnSyntaxQuery;
95 fn submodules() for hir::db::SubmodulesQuery; 95 fn submodules() for hir::db::SubmodulesQuery;
96 fn infer() for hir::db::InferQuery; 96 fn infer() for hir::db::InferQuery;
97 fn type_for_def() for hir::db::TypeForDefQuery;
97 } 98 }
98 } 99 }
99} 100}
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs
index f2912d235..40996bfd7 100644
--- a/crates/ra_analysis/src/imp.rs
+++ b/crates/ra_analysis/src/imp.rs
@@ -524,7 +524,7 @@ impl AnalysisImpl {
524 let function = ctry!(source_binder::function_from_source( 524 let function = ctry!(source_binder::function_from_source(
525 &*self.db, file_id, parent_fn 525 &*self.db, file_id, parent_fn
526 )?); 526 )?);
527 let infer = function.infer(&*self.db); 527 let infer = function.infer(&*self.db)?;
528 Ok(infer.type_of_node(node).map(|t| t.to_string())) 528 Ok(infer.type_of_node(node).map(|t| t.to_string()))
529 } 529 }
530 530