aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/src.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/src.rs')
-rw-r--r--crates/ra_hir_def/src/src.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir_def/src/src.rs b/crates/ra_hir_def/src/src.rs
index 499375b80..46e90da70 100644
--- a/crates/ra_hir_def/src/src.rs
+++ b/crates/ra_hir_def/src/src.rs
@@ -8,14 +8,14 @@ use crate::{db::DefDatabase, AssocItemLoc, ItemLoc};
8 8
9pub trait HasSource { 9pub trait HasSource {
10 type Value; 10 type Value;
11 fn source(&self, db: &impl DefDatabase) -> InFile<Self::Value>; 11 fn source(&self, db: &dyn DefDatabase) -> InFile<Self::Value>;
12} 12}
13 13
14impl<N: AstNode> HasSource for AssocItemLoc<N> { 14impl<N: AstNode> HasSource for AssocItemLoc<N> {
15 type Value = N; 15 type Value = N;
16 16
17 fn source(&self, db: &impl DefDatabase) -> InFile<N> { 17 fn source(&self, db: &dyn DefDatabase) -> InFile<N> {
18 let node = self.ast_id.to_node(db); 18 let node = self.ast_id.to_node(db.upcast());
19 InFile::new(self.ast_id.file_id, node) 19 InFile::new(self.ast_id.file_id, node)
20 } 20 }
21} 21}
@@ -23,8 +23,8 @@ impl<N: AstNode> HasSource for AssocItemLoc<N> {
23impl<N: AstNode> HasSource for ItemLoc<N> { 23impl<N: AstNode> HasSource for ItemLoc<N> {
24 type Value = N; 24 type Value = N;
25 25
26 fn source(&self, db: &impl DefDatabase) -> InFile<N> { 26 fn source(&self, db: &dyn DefDatabase) -> InFile<N> {
27 let node = self.ast_id.to_node(db); 27 let node = self.ast_id.to_node(db.upcast());
28 InFile::new(self.ast_id.file_id, node) 28 InFile::new(self.ast_id.file_id, node)
29 } 29 }
30} 30}
@@ -32,5 +32,5 @@ impl<N: AstNode> HasSource for ItemLoc<N> {
32pub trait HasChildSource { 32pub trait HasChildSource {
33 type ChildId; 33 type ChildId;
34 type Value; 34 type Value;
35 fn child_source(&self, db: &impl DefDatabase) -> InFile<ArenaMap<Self::ChildId, Self::Value>>; 35 fn child_source(&self, db: &dyn DefDatabase) -> InFile<ArenaMap<Self::ChildId, Self::Value>>;
36} 36}