diff options
Diffstat (limited to 'crates/ra_analysis/src/hir/mod.rs')
-rw-r--r-- | crates/ra_analysis/src/hir/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_analysis/src/hir/mod.rs b/crates/ra_analysis/src/hir/mod.rs index aa416df20..9527cc33f 100644 --- a/crates/ra_analysis/src/hir/mod.rs +++ b/crates/ra_analysis/src/hir/mod.rs | |||
@@ -16,6 +16,7 @@ use std::ops::Index; | |||
16 | use ra_syntax::{SyntaxNodeRef, SyntaxNode}; | 16 | use ra_syntax::{SyntaxNodeRef, SyntaxNode}; |
17 | 17 | ||
18 | use crate::{ | 18 | use crate::{ |
19 | FileId, | ||
19 | hir::db::HirDatabase, | 20 | hir::db::HirDatabase, |
20 | loc2id::{DefId, DefLoc}, | 21 | loc2id::{DefId, DefLoc}, |
21 | Cancelable, | 22 | Cancelable, |
@@ -53,6 +54,12 @@ impl DefId { | |||
53 | /// it's OK to use it as a salsa key/value. | 54 | /// it's OK to use it as a salsa key/value. |
54 | pub(crate) type SourceFileItemId = Id<SyntaxNode>; | 55 | pub(crate) type SourceFileItemId = Id<SyntaxNode>; |
55 | 56 | ||
57 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | ||
58 | pub(crate) struct SourceItemId { | ||
59 | file_id: FileId, | ||
60 | item_id: SourceFileItemId, | ||
61 | } | ||
62 | |||
56 | /// Maps item's `SyntaxNode`s to `SourceFileItemId` and back. | 63 | /// Maps item's `SyntaxNode`s to `SourceFileItemId` and back. |
57 | #[derive(Debug, PartialEq, Eq, Default)] | 64 | #[derive(Debug, PartialEq, Eq, Default)] |
58 | pub(crate) struct SourceFileItems { | 65 | pub(crate) struct SourceFileItems { |