mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-14 14:25:12 +00:00
fix: Properly cache files in Semantics when ascending macros
This commit is contained in:
parent
2f8dd64830
commit
f1cb5ed9b0
2 changed files with 15 additions and 8 deletions
|
@ -636,10 +636,7 @@ impl<'a> InFile<&'a SyntaxNode> {
|
|||
) -> impl Iterator<Item = InFile<SyntaxNode>> + Clone + '_ {
|
||||
iter::successors(Some(self.cloned()), move |node| match node.value.parent() {
|
||||
Some(parent) => Some(node.with_value(parent)),
|
||||
None => {
|
||||
let parent_node = node.file_id.call_node(db)?;
|
||||
Some(parent_node)
|
||||
}
|
||||
None => node.file_id.call_node(db),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue