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.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/hir-ty/src/infer/closure.rs b/crates/hir-ty/src/infer/closure.rs index 23189f383e..ff64ae252b 100644 --- a/crates/hir-ty/src/infer/closure.rs +++ b/crates/hir-ty/src/infer/closure.rs @@ -715,10 +715,9 @@ impl InferenceContext<'_> { } fn is_upvar(&self, place: &HirPlace) -> bool { - let b = &self.body[place.local]; if let Some(c) = self.current_closure { let (_, root) = self.db.lookup_intern_closure(c.into()); - return b.is_upvar(root); + return self.body.is_binding_upvar(place.local, root); } false } |