aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-20 12:47:44 +0000
committerAleksey Kladov <[email protected]>2019-12-20 12:47:44 +0000
commit1234dda9ee60a19a83a9664c2e1208247566b49b (patch)
treea476ee7ed8ef381806f6b7959dd256379e25133e /crates/ra_hir/src
parentd137df0137dab36819efada901e92cd2733f292b (diff)
Use generic ItemLoc for impls
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/code_model.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 35e1f752b..ecf883272 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -754,7 +754,7 @@ impl ImplBlock {
754 let environment = TraitEnvironment::lower(db, &resolver); 754 let environment = TraitEnvironment::lower(db, &resolver);
755 let ty = Ty::from_hir(db, &resolver, &impl_data.target_type); 755 let ty = Ty::from_hir(db, &resolver, &impl_data.target_type);
756 Type { 756 Type {
757 krate: self.id.lookup(db).container.krate, 757 krate: self.id.lookup(db).container.module(db).krate,
758 ty: InEnvironment { value: ty, environment }, 758 ty: InEnvironment { value: ty, environment },
759 } 759 }
760 } 760 }
@@ -768,7 +768,7 @@ impl ImplBlock {
768 } 768 }
769 769
770 pub fn module(&self, db: &impl DefDatabase) -> Module { 770 pub fn module(&self, db: &impl DefDatabase) -> Module {
771 self.id.lookup(db).container.into() 771 self.id.lookup(db).container.module(db).into()
772 } 772 }
773 773
774 pub fn krate(&self, db: &impl DefDatabase) -> Crate { 774 pub fn krate(&self, db: &impl DefDatabase) -> Crate {