Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_expand/src/lib.rs')
| -rw-r--r-- | crates/hir_expand/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index 4c09b2ab19..4ec3e10f49 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs @@ -547,10 +547,10 @@ impl InFile<SyntaxToken> { self, db: &dyn db::AstDatabase, ) -> impl Iterator<Item = InFile<SyntaxNode>> + '_ { - self.value - .parent() - .into_iter() - .flat_map(move |parent| InFile::new(self.file_id, parent).ancestors_with_macros(db)) + self.value.parent().into_iter().flat_map({ + let file_id = self.file_id; + move |parent| InFile::new(file_id, parent).ancestors_with_macros(db) + }) } } |