aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/traits.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/traits.rs')
-rw-r--r--crates/ra_hir/src/traits.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/ra_hir/src/traits.rs b/crates/ra_hir/src/traits.rs
index dfe883fa4..2a7c2b791 100644
--- a/crates/ra_hir/src/traits.rs
+++ b/crates/ra_hir/src/traits.rs
@@ -5,7 +5,10 @@ use rustc_hash::FxHashMap;
5 5
6use ra_syntax::ast::{self, NameOwner}; 6use ra_syntax::ast::{self, NameOwner};
7 7
8use crate::{Function, Const, TypeAlias, Name, DefDatabase, Trait, ids::LocationCtx, name::AsName, Module}; 8use crate::{
9 Function, Const, TypeAlias, Name, DefDatabase, Trait, AstDatabase, Module,
10 ids::LocationCtx, name::AsName,
11};
9 12
10#[derive(Debug, Clone, PartialEq, Eq)] 13#[derive(Debug, Clone, PartialEq, Eq)]
11pub struct TraitData { 14pub struct TraitData {
@@ -15,7 +18,10 @@ pub struct TraitData {
15} 18}
16 19
17impl TraitData { 20impl TraitData {
18 pub(crate) fn trait_data_query(db: &impl DefDatabase, tr: Trait) -> Arc<TraitData> { 21 pub(crate) fn trait_data_query(
22 db: &(impl DefDatabase + AstDatabase),
23 tr: Trait,
24 ) -> Arc<TraitData> {
19 let (file_id, node) = tr.source(db); 25 let (file_id, node) = tr.source(db);
20 let name = node.name().map(|n| n.as_name()); 26 let name = node.name().map(|n| n.as_name());
21 let module = tr.module(db); 27 let module = tr.module(db);