diff options
Diffstat (limited to 'crates/ra_hir_ty/src')
-rw-r--r-- | crates/ra_hir_ty/src/lower.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs index 6af5bf50a..5f795bc02 100644 --- a/crates/ra_hir_ty/src/lower.rs +++ b/crates/ra_hir_ty/src/lower.rs | |||
@@ -14,7 +14,7 @@ use hir_def::{ | |||
14 | path::{GenericArg, Path, PathKind, PathSegment}, | 14 | path::{GenericArg, Path, PathKind, PathSegment}, |
15 | resolver::{HasResolver, Resolver, TypeNs}, | 15 | resolver::{HasResolver, Resolver, TypeNs}, |
16 | type_ref::{TypeBound, TypeRef}, | 16 | type_ref::{TypeBound, TypeRef}, |
17 | AdtId, AstItemDef, ConstId, EnumId, EnumVariantId, FunctionId, GenericDefId, HasModule, ImplId, | 17 | AdtId, ConstId, EnumId, EnumVariantId, FunctionId, GenericDefId, HasModule, ImplId, |
18 | LocalStructFieldId, Lookup, StaticId, StructId, TraitId, TypeAliasId, UnionId, VariantId, | 18 | LocalStructFieldId, Lookup, StaticId, StructId, TraitId, TypeAliasId, UnionId, VariantId, |
19 | }; | 19 | }; |
20 | use ra_arena::map::ArenaMap; | 20 | use ra_arena::map::ArenaMap; |
@@ -698,10 +698,11 @@ impl_froms!(CallableDef: FunctionId, StructId, EnumVariantId); | |||
698 | impl CallableDef { | 698 | impl CallableDef { |
699 | pub fn krate(self, db: &impl HirDatabase) -> CrateId { | 699 | pub fn krate(self, db: &impl HirDatabase) -> CrateId { |
700 | match self { | 700 | match self { |
701 | CallableDef::FunctionId(f) => f.lookup(db).module(db).krate, | 701 | CallableDef::FunctionId(f) => f.lookup(db).module(db), |
702 | CallableDef::StructId(s) => s.lookup(db).container.krate, | 702 | CallableDef::StructId(s) => s.lookup(db).container, |
703 | CallableDef::EnumVariantId(e) => e.parent.module(db).krate, | 703 | CallableDef::EnumVariantId(e) => e.parent.lookup(db).container, |
704 | } | 704 | } |
705 | .krate | ||
705 | } | 706 | } |
706 | } | 707 | } |
707 | 708 | ||