diff options
Diffstat (limited to 'crates/ra_analysis/src/hir/query_definitions.rs')
-rw-r--r-- | crates/ra_analysis/src/hir/query_definitions.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/crates/ra_analysis/src/hir/query_definitions.rs b/crates/ra_analysis/src/hir/query_definitions.rs index 53926cf16..ae292e964 100644 --- a/crates/ra_analysis/src/hir/query_definitions.rs +++ b/crates/ra_analysis/src/hir/query_definitions.rs | |||
@@ -12,7 +12,7 @@ use ra_syntax::{ | |||
12 | use crate::{ | 12 | use crate::{ |
13 | FileId, Cancelable, | 13 | FileId, Cancelable, |
14 | hir::{ | 14 | hir::{ |
15 | SourceFileItems, SourceFileItemId, | 15 | SourceFileItems, SourceItemId, |
16 | db::HirDatabase, | 16 | db::HirDatabase, |
17 | function::{FnId, FnScopes}, | 17 | function::{FnId, FnScopes}, |
18 | module::{ | 18 | module::{ |
@@ -52,12 +52,8 @@ pub(super) fn file_items(db: &impl HirDatabase, file_id: FileId) -> Arc<SourceFi | |||
52 | Arc::new(res) | 52 | Arc::new(res) |
53 | } | 53 | } |
54 | 54 | ||
55 | pub(super) fn file_item( | 55 | pub(super) fn file_item(db: &impl HirDatabase, source_item_id: SourceItemId) -> SyntaxNode { |
56 | db: &impl HirDatabase, | 56 | db.file_items(source_item_id.file_id)[source_item_id.item_id].clone() |
57 | file_id: FileId, | ||
58 | file_item_id: SourceFileItemId, | ||
59 | ) -> SyntaxNode { | ||
60 | db.file_items(file_id)[file_item_id].clone() | ||
61 | } | 57 | } |
62 | 58 | ||
63 | pub(crate) fn submodules( | 59 | pub(crate) fn submodules( |