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.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir/src/traits.rs b/crates/ra_hir/src/traits.rs
index 967654e97..f2950e1b2 100644
--- a/crates/ra_hir/src/traits.rs
+++ b/crates/ra_hir/src/traits.rs
@@ -6,7 +6,7 @@ use rustc_hash::FxHashMap;
6use ra_syntax::ast::{self, NameOwner}; 6use ra_syntax::ast::{self, NameOwner};
7 7
8use crate::{ 8use crate::{
9 Function, Const, TypeAlias, Name, DefDatabase, Trait, AstDatabase, Module, 9 Function, Const, TypeAlias, Name, DefDatabase, Trait, AstDatabase, Module, HasSource,
10 ids::LocationCtx, name::AsName, 10 ids::LocationCtx, name::AsName,
11}; 11};
12 12
@@ -22,12 +22,12 @@ impl TraitData {
22 db: &(impl DefDatabase + AstDatabase), 22 db: &(impl DefDatabase + AstDatabase),
23 tr: Trait, 23 tr: Trait,
24 ) -> Arc<TraitData> { 24 ) -> Arc<TraitData> {
25 let (file_id, node) = tr.source(db); 25 let src = tr.source(db);
26 let name = node.name().map(|n| n.as_name()); 26 let name = src.ast.name().map(|n| n.as_name());
27 let module = tr.module(db); 27 let module = tr.module(db);
28 let ctx = LocationCtx::new(db, module, file_id); 28 let ctx = LocationCtx::new(db, module, src.file_id);
29 let auto = node.is_auto(); 29 let auto = src.ast.is_auto();
30 let items = if let Some(item_list) = node.item_list() { 30 let items = if let Some(item_list) = src.ast.item_list() {
31 item_list 31 item_list
32 .impl_items() 32 .impl_items()
33 .map(|item_node| match item_node.kind() { 33 .map(|item_node| match item_node.kind() {