aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/impls.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/impls.rs')
-rw-r--r--crates/ra_hir_def/src/impls.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/impls.rs b/crates/ra_hir_def/src/impls.rs
index 574086ac7..750a869f2 100644
--- a/crates/ra_hir_def/src/impls.rs
+++ b/crates/ra_hir_def/src/impls.rs
@@ -9,8 +9,8 @@ use hir_expand::AstId;
9use ra_syntax::ast; 9use ra_syntax::ast;
10 10
11use crate::{ 11use crate::{
12 db::DefDatabase2, type_ref::TypeRef, AssocItemId, AstItemDef, ConstId, ContainerId, 12 db::DefDatabase2, type_ref::TypeRef, AssocItemId, AstItemDef, ConstLoc, ContainerId,
13 FunctionLoc, ImplId, Intern, LocationCtx, TypeAliasLoc, 13 FunctionLoc, ImplId, Intern, TypeAliasLoc,
14}; 14};
15 15
16#[derive(Debug, Clone, PartialEq, Eq)] 16#[derive(Debug, Clone, PartialEq, Eq)]
@@ -31,7 +31,6 @@ impl ImplData {
31 let negative = src.value.is_negative(); 31 let negative = src.value.is_negative();
32 32
33 let items = if let Some(item_list) = src.value.item_list() { 33 let items = if let Some(item_list) = src.value.item_list() {
34 let ctx = LocationCtx::new(db, id.module(db), src.file_id);
35 item_list 34 item_list
36 .impl_items() 35 .impl_items()
37 .map(|item_node| match item_node { 36 .map(|item_node| match item_node {
@@ -44,7 +43,12 @@ impl ImplData {
44 def.into() 43 def.into()
45 } 44 }
46 ast::ImplItem::ConstDef(it) => { 45 ast::ImplItem::ConstDef(it) => {
47 ConstId::from_ast_id(ctx, items.ast_id(&it)).into() 46 let def = ConstLoc {
47 container: ContainerId::ImplId(id),
48 ast_id: AstId::new(src.file_id, items.ast_id(&it)),
49 }
50 .intern(db);
51 def.into()
48 } 52 }
49 ast::ImplItem::TypeAliasDef(it) => { 53 ast::ImplItem::TypeAliasDef(it) => {
50 let def = TypeAliasLoc { 54 let def = TypeAliasLoc {