Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/coerce.rs')
| -rw-r--r-- | crates/hir-ty/src/infer/coerce.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir-ty/src/infer/coerce.rs b/crates/hir-ty/src/infer/coerce.rs index b0fb01a84d..847dd43a02 100644 --- a/crates/hir-ty/src/infer/coerce.rs +++ b/crates/hir-ty/src/infer/coerce.rs @@ -148,11 +148,11 @@ impl CoerceMany { if let (Ok(result1), Ok(result2)) = (result1, result2) { ctx.table.register_infer_ok(InferOk { value: (), goals: result1.goals }); for &e in &self.expressions { - ctx.write_expr_adj(e, result1.value.0.clone()); + ctx.write_expr_adj(e, result1.value.0.clone().into_boxed_slice()); } ctx.table.register_infer_ok(InferOk { value: (), goals: result2.goals }); if let Some(expr) = expr { - ctx.write_expr_adj(expr, result2.value.0); + ctx.write_expr_adj(expr, result2.value.0.into_boxed_slice()); self.expressions.push(expr); } return self.final_ty = Some(target_ty); @@ -182,7 +182,7 @@ impl CoerceMany { { self.final_ty = Some(res); for &e in &self.expressions { - ctx.write_expr_adj(e, adjustments.clone()); + ctx.write_expr_adj(e, adjustments.clone().into_boxed_slice()); } } else { match cause { @@ -263,7 +263,7 @@ impl InferenceContext<'_> { ) -> Result<Ty, TypeError> { let (adjustments, ty) = self.coerce_inner(from_ty, to_ty, coerce_never)?; if let Some(expr) = expr { - self.write_expr_adj(expr, adjustments); + self.write_expr_adj(expr, adjustments.into_boxed_slice()); } Ok(ty) } |