aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/db.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-26 18:07:21 +0000
committerGitHub <[email protected]>2019-11-26 18:07:21 +0000
commit141fca60061d85494fcb719a4c8237eaf6c7c134 (patch)
tree6a7abab05196f1cd3bc2185ab7f02ac89e413c69 /crates/ra_hir/src/db.rs
parent3b0fc8ac6224e8ab8848de791011add6a149b9d4 (diff)
parent4e415a269e2d821f31963c05843517c6fde0132d (diff)
Merge #2419
2419: Remove ns-polymorphic type_for_def r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r--crates/ra_hir/src/db.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index 32f05a4d8..3b5aa7516 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -9,8 +9,8 @@ use crate::{
9 ty::{ 9 ty::{
10 method_resolution::CrateImplBlocks, 10 method_resolution::CrateImplBlocks,
11 traits::{AssocTyValue, Impl}, 11 traits::{AssocTyValue, Impl},
12 CallableDef, FnSig, GenericPredicate, InferenceResult, Namespace, Substs, Ty, TypableDef, 12 CallableDef, FnSig, GenericPredicate, InferenceResult, Substs, Ty, TyDefId, TypeCtor,
13 TypeCtor, 13 ValueTyDefId,
14 }, 14 },
15 Crate, DefWithBody, ImplBlock, Trait, 15 Crate, DefWithBody, ImplBlock, Trait,
16}; 16};
@@ -37,8 +37,11 @@ pub trait HirDatabase: DefDatabase {
37 #[salsa::invoke(crate::ty::infer_query)] 37 #[salsa::invoke(crate::ty::infer_query)]
38 fn infer(&self, def: DefWithBody) -> Arc<InferenceResult>; 38 fn infer(&self, def: DefWithBody) -> Arc<InferenceResult>;
39 39
40 #[salsa::invoke(crate::ty::type_for_def)] 40 #[salsa::invoke(crate::ty::ty_query)]
41 fn type_for_def(&self, def: TypableDef, ns: Namespace) -> Ty; 41 fn ty(&self, def: TyDefId) -> Ty;
42
43 #[salsa::invoke(crate::ty::value_ty_query)]
44 fn value_ty(&self, def: ValueTyDefId) -> Ty;
42 45
43 #[salsa::invoke(crate::ty::field_types_query)] 46 #[salsa::invoke(crate::ty::field_types_query)]
44 fn field_types(&self, var: VariantId) -> Arc<ArenaMap<LocalStructFieldId, Ty>>; 47 fn field_types(&self, var: VariantId) -> Arc<ArenaMap<LocalStructFieldId, Ty>>;