diff options
Diffstat (limited to 'crates/hir_expand')
-rw-r--r-- | crates/hir_expand/src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index e388ddacc..eee430af1 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs | |||
@@ -510,7 +510,10 @@ impl InFile<SyntaxToken> { | |||
510 | self, | 510 | self, |
511 | db: &dyn db::AstDatabase, | 511 | db: &dyn db::AstDatabase, |
512 | ) -> impl Iterator<Item = InFile<SyntaxNode>> + '_ { | 512 | ) -> impl Iterator<Item = InFile<SyntaxNode>> + '_ { |
513 | self.map(|it| it.parent()).ancestors_with_macros(db) | 513 | self.value |
514 | .parent() | ||
515 | .into_iter() | ||
516 | .flat_map(move |parent| InFile::new(self.file_id, parent).ancestors_with_macros(db)) | ||
514 | } | 517 | } |
515 | } | 518 | } |
516 | 519 | ||