mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Use correct HirFileId in find_related_test
This commit is contained in:
parent
7342dcf0b0
commit
557df6ff3f
3 changed files with 14 additions and 16 deletions
|
@ -173,6 +173,10 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
|
|||
self.imp.descend_node_at_offset(node, offset).find_map(N::cast)
|
||||
}
|
||||
|
||||
pub fn hir_file_for(&self, syntax_node: &SyntaxNode) -> HirFileId {
|
||||
self.imp.find_file(syntax_node.clone()).file_id
|
||||
}
|
||||
|
||||
pub fn original_range(&self, node: &SyntaxNode) -> FileRange {
|
||||
self.imp.original_range(node)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue