From e480d81988fc0c0e4f80f1c54058b95b9aaf1ebf Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Thu, 1 Apr 2021 21:04:02 +0200 Subject: Introduce `GenericArg` like in Chalk Plus some more adaptations to Substitution. Lots of `assert_ty_ref` that we should revisit when introducing lifetime/const parameters. --- crates/hir_ty/src/infer/coerce.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_ty/src/infer/coerce.rs') diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs index 9c62932b1..8f7322b36 100644 --- a/crates/hir_ty/src/infer/coerce.rs +++ b/crates/hir_ty/src/infer/coerce.rs @@ -100,7 +100,7 @@ impl<'a> InferenceContext<'a> { }, (TyKind::Closure(.., substs), TyKind::Function { .. }) => { - from_ty = substs[0].clone(); + from_ty = substs.at(&Interner, 0).assert_ty_ref(&Interner).clone(); } _ => {} -- cgit v1.2.3