diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/traits/chalk.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty/traits/chalk.rs b/crates/ra_hir/src/ty/traits/chalk.rs index 0272dd9ae..fd2f1b174 100644 --- a/crates/ra_hir/src/ty/traits/chalk.rs +++ b/crates/ra_hir/src/ty/traits/chalk.rs | |||
@@ -9,7 +9,7 @@ use chalk_ir::{ | |||
9 | }; | 9 | }; |
10 | use chalk_rust_ir::{AssociatedTyDatum, AssociatedTyValue, ImplDatum, StructDatum, TraitDatum}; | 10 | use chalk_rust_ir::{AssociatedTyDatum, AssociatedTyValue, ImplDatum, StructDatum, TraitDatum}; |
11 | 11 | ||
12 | use hir_def::{lang_item::LangItemTarget, GenericDefId}; | 12 | use hir_def::{lang_item::LangItemTarget, GenericDefId, TypeAliasId}; |
13 | use hir_expand::name; | 13 | use hir_expand::name; |
14 | 14 | ||
15 | use ra_db::salsa::{InternId, InternKey}; | 15 | use ra_db::salsa::{InternId, InternKey}; |
@@ -215,6 +215,18 @@ impl ToChalk for TypeAlias { | |||
215 | } | 215 | } |
216 | } | 216 | } |
217 | 217 | ||
218 | impl ToChalk for TypeAliasId { | ||
219 | type Chalk = chalk_ir::TypeId; | ||
220 | |||
221 | fn to_chalk(self, _db: &impl HirDatabase) -> chalk_ir::TypeId { | ||
222 | chalk_ir::TypeId(id_to_chalk(self)) | ||
223 | } | ||
224 | |||
225 | fn from_chalk(_db: &impl HirDatabase, type_alias_id: chalk_ir::TypeId) -> TypeAliasId { | ||
226 | id_from_chalk(type_alias_id.0) | ||
227 | } | ||
228 | } | ||
229 | |||
218 | impl ToChalk for AssocTyValue { | 230 | impl ToChalk for AssocTyValue { |
219 | type Chalk = chalk_rust_ir::AssociatedTyValueId; | 231 | type Chalk = chalk_rust_ir::AssociatedTyValueId; |
220 | 232 | ||