diff options
Diffstat (limited to 'crates/ra_hir_ty/src/db.rs')
-rw-r--r-- | crates/ra_hir_ty/src/db.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/ra_hir_ty/src/db.rs b/crates/ra_hir_ty/src/db.rs index 84afe0484..608bab1b1 100644 --- a/crates/ra_hir_ty/src/db.rs +++ b/crates/ra_hir_ty/src/db.rs | |||
@@ -3,8 +3,8 @@ | |||
3 | use std::sync::Arc; | 3 | use std::sync::Arc; |
4 | 4 | ||
5 | use hir_def::{ | 5 | use hir_def::{ |
6 | db::DefDatabase, DefWithBodyId, FunctionId, GenericDefId, ImplId, LocalFieldId, TypeParamId, | 6 | db::DefDatabase, expr::ExprId, DefWithBodyId, FunctionId, GenericDefId, ImplId, LocalFieldId, |
7 | VariantId, | 7 | TypeParamId, VariantId, |
8 | }; | 8 | }; |
9 | use ra_arena::map::ArenaMap; | 9 | use ra_arena::map::ArenaMap; |
10 | use ra_db::{impl_intern_key, salsa, CrateId, Upcast}; | 10 | use ra_db::{impl_intern_key, salsa, CrateId, Upcast}; |
@@ -12,9 +12,9 @@ use ra_prof::profile; | |||
12 | 12 | ||
13 | use crate::{ | 13 | use crate::{ |
14 | method_resolution::{InherentImpls, TraitImpls}, | 14 | method_resolution::{InherentImpls, TraitImpls}, |
15 | traits::{chalk, AssocTyValue, Impl}, | 15 | traits::chalk, |
16 | Binders, CallableDef, GenericPredicate, InferenceResult, OpaqueTyId, PolyFnSig, | 16 | Binders, CallableDef, GenericPredicate, InferenceResult, OpaqueTyId, PolyFnSig, |
17 | ReturnTypeImplTraits, TraitRef, Ty, TyDefId, TypeCtor, ValueTyDefId, | 17 | ReturnTypeImplTraits, TraitRef, Ty, TyDefId, ValueTyDefId, |
18 | }; | 18 | }; |
19 | use hir_expand::name::Name; | 19 | use hir_expand::name::Name; |
20 | 20 | ||
@@ -77,17 +77,13 @@ pub trait HirDatabase: DefDatabase + Upcast<dyn DefDatabase> { | |||
77 | 77 | ||
78 | // Interned IDs for Chalk integration | 78 | // Interned IDs for Chalk integration |
79 | #[salsa::interned] | 79 | #[salsa::interned] |
80 | fn intern_type_ctor(&self, type_ctor: TypeCtor) -> crate::TypeCtorId; | ||
81 | #[salsa::interned] | ||
82 | fn intern_callable_def(&self, callable_def: CallableDef) -> crate::CallableDefId; | 80 | fn intern_callable_def(&self, callable_def: CallableDef) -> crate::CallableDefId; |
83 | #[salsa::interned] | 81 | #[salsa::interned] |
84 | fn intern_type_param_id(&self, param_id: TypeParamId) -> GlobalTypeParamId; | 82 | fn intern_type_param_id(&self, param_id: TypeParamId) -> GlobalTypeParamId; |
85 | #[salsa::interned] | 83 | #[salsa::interned] |
86 | fn intern_impl_trait_id(&self, id: OpaqueTyId) -> InternedOpaqueTyId; | 84 | fn intern_impl_trait_id(&self, id: OpaqueTyId) -> InternedOpaqueTyId; |
87 | #[salsa::interned] | 85 | #[salsa::interned] |
88 | fn intern_chalk_impl(&self, impl_: Impl) -> crate::traits::GlobalImplId; | 86 | fn intern_closure(&self, id: (DefWithBodyId, ExprId)) -> ClosureId; |
89 | #[salsa::interned] | ||
90 | fn intern_assoc_ty_value(&self, assoc_ty_value: AssocTyValue) -> crate::traits::AssocTyValueId; | ||
91 | 87 | ||
92 | #[salsa::invoke(chalk::associated_ty_data_query)] | 88 | #[salsa::invoke(chalk::associated_ty_data_query)] |
93 | fn associated_ty_data(&self, id: chalk::AssocTypeId) -> Arc<chalk::AssociatedTyDatum>; | 89 | fn associated_ty_data(&self, id: chalk::AssocTypeId) -> Arc<chalk::AssociatedTyDatum>; |
@@ -151,3 +147,7 @@ impl_intern_key!(GlobalTypeParamId); | |||
151 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 147 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
152 | pub struct InternedOpaqueTyId(salsa::InternId); | 148 | pub struct InternedOpaqueTyId(salsa::InternId); |
153 | impl_intern_key!(InternedOpaqueTyId); | 149 | impl_intern_key!(InternedOpaqueTyId); |
150 | |||
151 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | ||
152 | pub struct ClosureId(salsa::InternId); | ||
153 | impl_intern_key!(ClosureId); | ||