internal: prep to 2021 edition

This commit is contained in:
Aleksey Kladov 2021-08-20 16:20:18 +03:00
parent 2fbe1c9934
commit 1850849325
4 changed files with 11 additions and 9 deletions

View file

@ -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)
})
}
}