Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/lower.rs')
| -rw-r--r-- | crates/hir-ty/src/mir/lower.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir-ty/src/mir/lower.rs b/crates/hir-ty/src/mir/lower.rs index 49fb6f5305..7dcc00858e 100644 --- a/crates/hir-ty/src/mir/lower.rs +++ b/crates/hir-ty/src/mir/lower.rs @@ -1254,7 +1254,7 @@ impl<'a, 'db> MirLowerCtx<'a, 'db> { not_supported!("closure with non closure type"); }; self.result.closures.push(id.0); - let closure_data = &self.infer.closures_data[&id.0.loc(self.db).1]; + let closure_data = &self.infer.closures_data[&id.0.loc(self.db).expr]; let span = |sources: &[CaptureSourceStack]| match sources .first() @@ -2144,7 +2144,7 @@ pub fn mir_body_for_closure_query<'db>( db: &'db dyn HirDatabase, closure: InternedClosureId, ) -> Result<'db, Arc<MirBody>> { - let InternedClosure(owner, expr) = closure.loc(db); + let InternedClosure { owner, expr, .. } = closure.loc(db); let body_owner = owner.as_def_with_body().expect("MIR lowering should only happen for body-owned closures"); let body = Body::of(db, body_owner); |