diff options
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r-- | crates/hir_ty/src/infer/coerce.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs index 159a53a63..f1af2a0bd 100644 --- a/crates/hir_ty/src/infer/coerce.rs +++ b/crates/hir_ty/src/infer/coerce.rs | |||
@@ -7,7 +7,7 @@ | |||
7 | use chalk_ir::{cast::Cast, Mutability, TyVariableKind}; | 7 | use chalk_ir::{cast::Cast, Mutability, TyVariableKind}; |
8 | use hir_def::lang_item::LangItemTarget; | 8 | use hir_def::lang_item::LangItemTarget; |
9 | 9 | ||
10 | use crate::{autoderef, Interner, Solution, Ty, TyBuilder, TyExt, TyKind}; | 10 | use crate::{autoderef, Canonical, Interner, Solution, Ty, TyBuilder, TyExt, TyKind}; |
11 | 11 | ||
12 | use super::{InEnvironment, InferenceContext}; | 12 | use super::{InEnvironment, InferenceContext}; |
13 | 13 | ||
@@ -148,7 +148,14 @@ impl<'a> InferenceContext<'a> { | |||
148 | 148 | ||
149 | match solution { | 149 | match solution { |
150 | Solution::Unique(v) => { | 150 | Solution::Unique(v) => { |
151 | canonicalized.apply_solution(self, v.0); | 151 | canonicalized.apply_solution( |
152 | self, | ||
153 | Canonical { | ||
154 | binders: v.binders, | ||
155 | // FIXME handle constraints | ||
156 | value: v.value.subst, | ||
157 | }, | ||
158 | ); | ||
152 | } | 159 | } |
153 | _ => return None, | 160 | _ => return None, |
154 | }; | 161 | }; |