Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r--crates/hir/src/lib.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index eaae15835d..862067e591 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -88,7 +88,7 @@ use hir_ty::{
next_solver::{
ClauseKind, DbInterner, GenericArgs,
infer::InferCtxt,
- mapping::{ChalkToNextSolver, convert_ty_for_result},
+ mapping::{ChalkToNextSolver, NextSolverToChalk, convert_ty_for_result},
},
primitive::UintTy,
traits::FnTrait,
@@ -5171,7 +5171,14 @@ impl<'db> Type<'db> {
.build();
let goal = Canonical {
- value: hir_ty::InEnvironment::new(&self.env.env, trait_ref.cast(Interner)),
+ value: hir_ty::InEnvironment::new(
+ &self.env.env.to_chalk(DbInterner::new_with(
+ db,
+ Some(self.env.krate),
+ self.env.block,
+ )),
+ trait_ref.cast(Interner),
+ ),
binders: CanonicalVarKinds::empty(Interner),
};