From ef67581104eb00a0c199f0b2a3b558da8a6f90a2 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 23 Dec 2018 17:13:11 +0100 Subject: Resolve paths to defs (functions currently) during type inference --- crates/ra_analysis/src/db.rs | 1 + crates/ra_analysis/src/imp.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_analysis/src') 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! { 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; } } } 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 { 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())) } -- cgit v1.2.3