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_hir/src/db.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src/db.rs') diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index f0bff3c02..d94f75857 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs @@ -14,7 +14,7 @@ use crate::{ function::FnId, module::{ModuleId, ModuleTree, ModuleSource, nameres::{ItemMap, InputModuleItems}}, - ty::InferenceResult, + ty::{InferenceResult, Ty}, }; salsa::query_group! { @@ -31,11 +31,16 @@ pub trait HirDatabase: SyntaxDatabase use fn query_definitions::fn_syntax; } - fn infer(fn_id: FnId) -> Arc { + fn infer(fn_id: FnId) -> Cancelable> { type InferQuery; use fn query_definitions::infer; } + fn type_for_def(def_id: DefId) -> Cancelable { + type TypeForDefQuery; + use fn query_definitions::type_for_def; + } + fn file_items(file_id: FileId) -> Arc { type SourceFileItemsQuery; use fn query_definitions::file_items; -- cgit v1.2.3