From 1234dda9ee60a19a83a9664c2e1208247566b49b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 20 Dec 2019 13:47:44 +0100 Subject: Use generic ItemLoc for impls --- crates/ra_hir/src/code_model.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src') 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 { let environment = TraitEnvironment::lower(db, &resolver); let ty = Ty::from_hir(db, &resolver, &impl_data.target_type); Type { - krate: self.id.lookup(db).container.krate, + krate: self.id.lookup(db).container.module(db).krate, ty: InEnvironment { value: ty, environment }, } } @@ -768,7 +768,7 @@ impl ImplBlock { } pub fn module(&self, db: &impl DefDatabase) -> Module { - self.id.lookup(db).container.into() + self.id.lookup(db).container.module(db).into() } pub fn krate(&self, db: &impl DefDatabase) -> Crate { -- cgit v1.2.3