Upgrade rowan

Notably, new rowan comes with support for mutable syntax trees.
This commit is contained in:
Aleksey Kladov 2021-01-30 18:19:21 +03:00
parent 62ec04bbd5
commit f5a81ec468
41 changed files with 376 additions and 176 deletions

View file

@ -510,7 +510,10 @@ impl InFile<SyntaxToken> {
self,
db: &dyn db::AstDatabase,
) -> impl Iterator<Item = InFile<SyntaxNode>> + '_ {
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))
}
}