diff options
Diffstat (limited to 'crates/ra_hir/src/traits.rs')
-rw-r--r-- | crates/ra_hir/src/traits.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_hir/src/traits.rs b/crates/ra_hir/src/traits.rs index e39511518..1a45dacba 100644 --- a/crates/ra_hir/src/traits.rs +++ b/crates/ra_hir/src/traits.rs | |||
@@ -1,14 +1,15 @@ | |||
1 | //! HIR for trait definitions. | 1 | //! HIR for trait definitions. |
2 | 2 | ||
3 | use rustc_hash::FxHashMap; | ||
4 | use std::sync::Arc; | 3 | use std::sync::Arc; |
5 | 4 | ||
5 | use hir_expand::name::AsName; | ||
6 | |||
6 | use ra_syntax::ast::{self, NameOwner}; | 7 | use ra_syntax::ast::{self, NameOwner}; |
8 | use rustc_hash::FxHashMap; | ||
7 | 9 | ||
8 | use crate::{ | 10 | use crate::{ |
9 | db::{AstDatabase, DefDatabase}, | 11 | db::{AstDatabase, DefDatabase}, |
10 | ids::LocationCtx, | 12 | ids::LocationCtx, |
11 | name::AsName, | ||
12 | AssocItem, Const, Function, HasSource, Module, Name, Trait, TypeAlias, | 13 | AssocItem, Const, Function, HasSource, Module, Name, Trait, TypeAlias, |
13 | }; | 14 | }; |
14 | 15 | ||
@@ -27,7 +28,7 @@ impl TraitData { | |||
27 | let src = tr.source(db); | 28 | let src = tr.source(db); |
28 | let name = src.ast.name().map(|n| n.as_name()); | 29 | let name = src.ast.name().map(|n| n.as_name()); |
29 | let module = tr.module(db); | 30 | let module = tr.module(db); |
30 | let ctx = LocationCtx::new(db, module, src.file_id); | 31 | let ctx = LocationCtx::new(db, module.id, src.file_id); |
31 | let auto = src.ast.is_auto(); | 32 | let auto = src.ast.is_auto(); |
32 | let items = if let Some(item_list) = src.ast.item_list() { | 33 | let items = if let Some(item_list) = src.ast.item_list() { |
33 | item_list | 34 | item_list |