From c4fd3f47f5b4f34476f8f085f2412a46aa0fd24f Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 21 Mar 2021 20:19:07 +0100 Subject: Align InEnvironment with Chalk This in particular means storing a chalk_ir::Environment, not our TraitEnvironment. This makes InEnvironment not usable for Type, where we need to keep the full TraitEnvironment. --- crates/hir_ty/src/traits/chalk/mapping.rs | 5 +---- 1 file changed, 1 insertion(+), 4 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 58d8f2894..aef6b8a15 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs @@ -455,10 +455,7 @@ where type Chalk = chalk_ir::InEnvironment; fn to_chalk(self, db: &dyn HirDatabase) -> chalk_ir::InEnvironment { - chalk_ir::InEnvironment { - environment: self.environment.env.clone(), - goal: self.value.to_chalk(db), - } + chalk_ir::InEnvironment { environment: self.environment, goal: self.goal.to_chalk(db) } } fn from_chalk( -- cgit v1.2.3