From f5a81ec4683613bd62624811733345d627f2127b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 30 Jan 2021 18:19:21 +0300 Subject: Upgrade rowan Notably, new rowan comes with support for mutable syntax trees. --- crates/hir_expand/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/hir_expand/src/lib.rs') 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 { self, db: &dyn db::AstDatabase, ) -> impl Iterator> + '_ { - self.map(|it| it.parent()).ancestors_with_macros(db) + self.value + .parent() + .into_iter() + .flat_map(move |parent| InFile::new(self.file_id, parent).ancestors_with_macros(db)) } } -- cgit v1.2.3