diff options
Diffstat (limited to 'crates/ra_hir_ty/src/db.rs')
-rw-r--r-- | crates/ra_hir_ty/src/db.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/crates/ra_hir_ty/src/db.rs b/crates/ra_hir_ty/src/db.rs index 84afe0484..d8a798771 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,7 +12,7 @@ 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, TypeCtor, ValueTyDefId, |
18 | }; | 18 | }; |
@@ -85,9 +85,7 @@ pub trait HirDatabase: DefDatabase + Upcast<dyn DefDatabase> { | |||
85 | #[salsa::interned] | 85 | #[salsa::interned] |
86 | fn intern_impl_trait_id(&self, id: OpaqueTyId) -> InternedOpaqueTyId; | 86 | fn intern_impl_trait_id(&self, id: OpaqueTyId) -> InternedOpaqueTyId; |
87 | #[salsa::interned] | 87 | #[salsa::interned] |
88 | fn intern_chalk_impl(&self, impl_: Impl) -> crate::traits::GlobalImplId; | 88 | 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 | 89 | ||
92 | #[salsa::invoke(chalk::associated_ty_data_query)] | 90 | #[salsa::invoke(chalk::associated_ty_data_query)] |
93 | fn associated_ty_data(&self, id: chalk::AssocTypeId) -> Arc<chalk::AssociatedTyDatum>; | 91 | fn associated_ty_data(&self, id: chalk::AssocTypeId) -> Arc<chalk::AssociatedTyDatum>; |
@@ -151,3 +149,7 @@ impl_intern_key!(GlobalTypeParamId); | |||
151 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 149 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
152 | pub struct InternedOpaqueTyId(salsa::InternId); | 150 | pub struct InternedOpaqueTyId(salsa::InternId); |
153 | impl_intern_key!(InternedOpaqueTyId); | 151 | impl_intern_key!(InternedOpaqueTyId); |
152 | |||
153 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | ||
154 | pub struct ClosureId(salsa::InternId); | ||
155 | impl_intern_key!(ClosureId); | ||