Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/upvars.rs')
| -rw-r--r-- | crates/hir-ty/src/upvars.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/hir-ty/src/upvars.rs b/crates/hir-ty/src/upvars.rs index 026e6ab183..6dcd8b59a5 100644 --- a/crates/hir-ty/src/upvars.rs +++ b/crates/hir-ty/src/upvars.rs @@ -110,10 +110,7 @@ pub fn upvars_mentioned_impl( owner: ExpressionStoreOwnerId, ) -> Option<Box<FxHashMap<ExprId, Upvars>>> { let store = ExpressionStore::of(db, owner); - if store.const_expr_origins().is_empty() { - // Save constructing a Resolver. - return None; - } + store.expr_roots().next()?; let mut resolver = owner.resolver(db); let mut result = FxHashMap::default(); for root_expr in store.expr_roots() { |