aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/hir/query_definitions.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-11-27 22:53:54 +0000
committerAleksey Kladov <[email protected]>2018-11-27 22:53:54 +0000
commit9027a21f9a1c7fcee0a59a1e28928fed29781dd8 (patch)
tree48a1d6ae7046e995baafbb053c43688cd9496935 /crates/ra_analysis/src/hir/query_definitions.rs
parent00df339c419fc75af6a939b75be8bef5b5a69732 (diff)
Introduce SourceItemId
Diffstat (limited to 'crates/ra_analysis/src/hir/query_definitions.rs')
-rw-r--r--crates/ra_analysis/src/hir/query_definitions.rs10
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::{
12use crate::{ 12use 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
55pub(super) fn file_item( 55pub(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
63pub(crate) fn submodules( 59pub(crate) fn submodules(