We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c2eebd7 + 6c379b9 commit 8e4d9b8Copy full SHA for 8e4d9b8
crates/hir/src/semantics.rs
@@ -924,7 +924,12 @@ impl<'db> SemanticsImpl<'db> {
924
}
925
926
fn original_ast_node<N: AstNode>(&self, node: N) -> Option<N> {
927
- self.wrap_node_infile(node).original_ast_node(self.db.upcast()).map(|it| it.value)
+ self.wrap_node_infile(node).original_ast_node(self.db.upcast()).map(
928
+ |InFile { file_id, value }| {
929
+ self.cache(find_root(value.syntax()), file_id);
930
+ value
931
+ },
932
+ )
933
934
935
fn diagnostics_display_range(&self, src: InFile<SyntaxNodePtr>) -> FileRange {
0 commit comments