aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/traits/chalk/mapping.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/traits/chalk/mapping.rs')
-rw-r--r--crates/hir_ty/src/traits/chalk/mapping.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs
index fe62f3fa7..d6bacba1d 100644
--- a/crates/hir_ty/src/traits/chalk/mapping.rs
+++ b/crates/hir_ty/src/traits/chalk/mapping.rs
@@ -464,6 +464,18 @@ impl ToChalk for hir_def::ImplId {
464 } 464 }
465} 465}
466 466
467impl ToChalk for hir_def::AdtId {
468 type Chalk = AdtId;
469
470 fn to_chalk(self, _db: &dyn HirDatabase) -> Self::Chalk {
471 chalk_ir::AdtId(self.into())
472 }
473
474 fn from_chalk(_db: &dyn HirDatabase, id: AdtId) -> Self {
475 id.0
476 }
477}
478
467impl ToChalk for CallableDefId { 479impl ToChalk for CallableDefId {
468 type Chalk = FnDefId; 480 type Chalk = FnDefId;
469 481