From 50e01d2bc7429d718e0783d75458a6a047ee2b70 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 1 Mar 2021 21:57:39 +0100 Subject: Use chalk_ir::AdtId --- crates/hir_ty/src/traits/chalk/mapping.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'crates/hir_ty/src/traits/chalk') diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs index db1760e6c..3a08b67e9 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs @@ -86,7 +86,7 @@ impl ToChalk for Ty { Ty::Adt(adt_id, substs) => { let substitution = substs.to_chalk(db); - chalk_ir::TyKind::Adt(chalk_ir::AdtId(adt_id), substitution).intern(&Interner) + chalk_ir::TyKind::Adt(adt_id, substitution).intern(&Interner) } Ty::Alias(AliasTy::Projection(proj_ty)) => { let associated_ty_id = TypeAliasAsAssocType(proj_ty.associated_ty).to_chalk(db); @@ -183,7 +183,7 @@ impl ToChalk for Ty { Ty::Dyn(predicates) } - chalk_ir::TyKind::Adt(struct_id, subst) => Ty::Adt(struct_id.0, from_chalk(db, subst)), + chalk_ir::TyKind::Adt(adt_id, subst) => Ty::Adt(adt_id, from_chalk(db, subst)), chalk_ir::TyKind::AssociatedType(type_id, subst) => Ty::AssociatedType( from_chalk::(db, type_id).0, from_chalk(db, subst), @@ -325,18 +325,6 @@ impl ToChalk for hir_def::ImplId { } } -impl ToChalk for hir_def::AdtId { - type Chalk = AdtId; - - fn to_chalk(self, _db: &dyn HirDatabase) -> Self::Chalk { - chalk_ir::AdtId(self.into()) - } - - fn from_chalk(_db: &dyn HirDatabase, id: AdtId) -> Self { - id.0 - } -} - impl ToChalk for CallableDefId { type Chalk = FnDefId; -- cgit v1.2.3