MIR episode 4

This commit is contained in:
hkalbasi 2023-04-28 20:44:30 +03:30
parent 001607fdb4
commit 6312fbf521
47 changed files with 2557 additions and 805 deletions

View file

@ -282,7 +282,7 @@ impl<'a> InferenceContext<'a> {
let closure_id = self.db.intern_closure((self.owner, tgt_expr)).into();
let closure_ty = TyKind::Closure(
closure_id,
Substitution::from1(Interner, sig_ty.clone()),
TyBuilder::subst_for_closure(self.db, self.owner, sig_ty.clone()),
)
.intern(Interner);
self.deferred_closures.entry(closure_id).or_default();