diff options
Diffstat (limited to 'crates/ra_hir_def/src/lib.rs')
-rw-r--r-- | crates/ra_hir_def/src/lib.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs index 3a0420da0..2edf743ab 100644 --- a/crates/ra_hir_def/src/lib.rs +++ b/crates/ra_hir_def/src/lib.rs | |||
@@ -20,6 +20,8 @@ pub mod generics; | |||
20 | pub mod resolver; | 20 | pub mod resolver; |
21 | pub mod data; | 21 | pub mod data; |
22 | 22 | ||
23 | mod trace; | ||
24 | |||
23 | #[cfg(test)] | 25 | #[cfg(test)] |
24 | mod test_db; | 26 | mod test_db; |
25 | #[cfg(test)] | 27 | #[cfg(test)] |
@@ -31,7 +33,7 @@ pub mod nameres; | |||
31 | use std::hash::{Hash, Hasher}; | 33 | use std::hash::{Hash, Hasher}; |
32 | 34 | ||
33 | use hir_expand::{ast_id_map::FileAstId, db::AstDatabase, AstId, HirFileId, Source}; | 35 | use hir_expand::{ast_id_map::FileAstId, db::AstDatabase, AstId, HirFileId, Source}; |
34 | use ra_arena::{impl_arena_id, RawId}; | 36 | use ra_arena::{impl_arena_id, map::ArenaMap, RawId}; |
35 | use ra_db::{salsa, CrateId, FileId}; | 37 | use ra_db::{salsa, CrateId, FileId}; |
36 | use ra_syntax::{ast, AstNode, SyntaxNode}; | 38 | use ra_syntax::{ast, AstNode, SyntaxNode}; |
37 | 39 | ||
@@ -550,3 +552,12 @@ impl HasSource for ConstLoc { | |||
550 | Source::new(self.ast_id.file_id(), node) | 552 | Source::new(self.ast_id.file_id(), node) |
551 | } | 553 | } |
552 | } | 554 | } |
555 | |||
556 | pub trait HasChildSource { | ||
557 | type ChildId; | ||
558 | type Value; | ||
559 | fn child_source( | ||
560 | &self, | ||
561 | db: &impl db::DefDatabase2, | ||
562 | ) -> Source<ArenaMap<Self::ChildId, Self::Value>>; | ||
563 | } | ||