diff options
Diffstat (limited to 'crates/hir_ty/src/infer/coerce.rs')
-rw-r--r-- | crates/hir_ty/src/infer/coerce.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs index 4d80b4a08..911343cb9 100644 --- a/crates/hir_ty/src/infer/coerce.rs +++ b/crates/hir_ty/src/infer/coerce.rs | |||
@@ -402,12 +402,15 @@ impl<'a> InferenceContext<'a> { | |||
402 | // solve `CoerceUnsized` and `Unsize` goals at this point and leaves the | 402 | // solve `CoerceUnsized` and `Unsize` goals at this point and leaves the |
403 | // rest for later. Also, there's some logic about sized type variables. | 403 | // rest for later. Also, there's some logic about sized type variables. |
404 | // Need to find out in what cases this is necessary | 404 | // Need to find out in what cases this is necessary |
405 | let solution = self.db.trait_solve(krate, canonicalized.value.clone()).ok_or(TypeError)?; | 405 | let solution = self |
406 | .db | ||
407 | .trait_solve(krate, canonicalized.value.clone().cast(&Interner)) | ||
408 | .ok_or(TypeError)?; | ||
406 | 409 | ||
407 | match solution { | 410 | match solution { |
408 | Solution::Unique(v) => { | 411 | Solution::Unique(v) => { |
409 | canonicalized.apply_solution( | 412 | canonicalized.apply_solution( |
410 | self, | 413 | &mut self.table, |
411 | Canonical { | 414 | Canonical { |
412 | binders: v.binders, | 415 | binders: v.binders, |
413 | // FIXME handle constraints | 416 | // FIXME handle constraints |