Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/closure/analysis.rs')
-rw-r--r--crates/hir-ty/src/infer/closure/analysis.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/hir-ty/src/infer/closure/analysis.rs b/crates/hir-ty/src/infer/closure/analysis.rs
index d6d63891bb..308c01865a 100644
--- a/crates/hir-ty/src/infer/closure/analysis.rs
+++ b/crates/hir-ty/src/infer/closure/analysis.rs
@@ -43,6 +43,7 @@ impl<'db> HirPlace<'db> {
for p in &self.projections {
ty = p.projected_ty(
&ctx.table.infer_ctxt,
+ ctx.table.param_env,
ty,
|_, _, _| {
unreachable!("Closure field only happens in MIR");
@@ -839,6 +840,7 @@ impl<'db> InferenceContext<'_, 'db> {
for (i, p) in capture.place.projections.iter().enumerate() {
ty = p.projected_ty(
&self.table.infer_ctxt,
+ self.table.param_env,
ty,
|_, _, _| {
unreachable!("Closure field only happens in MIR");