diff options
author | Aleksey Kladov <[email protected]> | 2019-12-12 14:11:57 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-12 14:11:57 +0000 |
commit | 56710f119b7114efac237ac36ea21730b8bd5311 (patch) | |
tree | 9e54318d6f291e3d997a9fe99554c24eeb4a47bc /crates/ra_hir_ty | |
parent | f135a8ea55c0a46c67713fb3b79b5f62ada430c1 (diff) |
Move enum&union to new loc
Diffstat (limited to 'crates/ra_hir_ty')
-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 | ||