Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/closure.rs')
-rw-r--r--crates/hir-ty/src/infer/closure.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/hir-ty/src/infer/closure.rs b/crates/hir-ty/src/infer/closure.rs
index ab111736d5..2a5567dfae 100644
--- a/crates/hir-ty/src/infer/closure.rs
+++ b/crates/hir-ty/src/infer/closure.rs
@@ -304,7 +304,7 @@ impl<'db> InferenceContext<'_, 'db> {
};
// Now go through the argument patterns
- for (arg_pat, arg_ty) in args.iter().zip(bound_sig.skip_binder().inputs()) {
+ for (arg_pat, arg_ty) in args.iter().zip(liberated_sig.inputs()) {
self.infer_top_pat(*arg_pat, *arg_ty, PatOrigin::Param);
}
@@ -1148,8 +1148,9 @@ impl<'db> InferenceContext<'_, 'db> {
}
fn closure_sigs(&self, bound_sig: PolyFnSig<'db>) -> ClosureSignatures<'db> {
- let liberated_sig = bound_sig.skip_binder();
- // FIXME: When we lower HRTB we'll need to actually liberate regions here.
+ // TODO: def id needs to be changed?
+ let liberated_sig =
+ self.interner().liberate_late_bound_regions(self.owner.into(), bound_sig);
ClosureSignatures { bound_sig, liberated_sig }
}
}