From a3fd2faba5b0736fd51c7b94cae55e0a9609cdb0 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 28 Feb 2021 20:44:09 +0100 Subject: Remove Substs from Ty::ForeignType --- crates/hir_ty/src/traits/chalk/mapping.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 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 09e5a82b8..c17c19638 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs @@ -55,7 +55,7 @@ impl ToChalk for Ty { chalk_ir::TyKind::OpaqueType(id, substitution).intern(&Interner) } - Ty::ForeignType(type_alias, _) => { + Ty::ForeignType(type_alias) => { let foreign_type = TypeAliasAsForeignType(type_alias); let foreign_type_id = foreign_type.to_chalk(db); chalk_ir::TyKind::Foreign(foreign_type_id).intern(&Interner) @@ -221,10 +221,9 @@ impl ToChalk for Ty { Ty::Closure { def, expr, substs: from_chalk(db, subst) } } - chalk_ir::TyKind::Foreign(foreign_def_id) => Ty::ForeignType( - from_chalk::(db, foreign_def_id).0, - Substs::empty(), - ), + chalk_ir::TyKind::Foreign(foreign_def_id) => { + Ty::ForeignType(from_chalk::(db, foreign_def_id).0) + } chalk_ir::TyKind::Generator(_, _) => unimplemented!(), // FIXME chalk_ir::TyKind::GeneratorWitness(_, _) => unimplemented!(), // FIXME } -- cgit v1.2.3