aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres/collector.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-20 14:49:57 +0000
committerAleksey Kladov <[email protected]>2019-11-20 14:50:02 +0000
commitee95a35664e6fe9153f6324cfc57872ca365887c (patch)
tree3f13501f0e73fee374a0df05fb55614311559f15 /crates/ra_hir_def/src/nameres/collector.rs
parent64c21ed19594b323e72605ba8c5dd4c6eee433f6 (diff)
Don't duplicate ContainerId type
Diffstat (limited to 'crates/ra_hir_def/src/nameres/collector.rs')
-rw-r--r--crates/ra_hir_def/src/nameres/collector.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs
index 060185b61..71e01279d 100644
--- a/crates/ra_hir_def/src/nameres/collector.rs
+++ b/crates/ra_hir_def/src/nameres/collector.rs
@@ -19,9 +19,9 @@ use crate::{
19 per_ns::PerNs, raw, CrateDefMap, ModuleData, Resolution, ResolveMode, 19 per_ns::PerNs, raw, CrateDefMap, ModuleData, Resolution, ResolveMode,
20 }, 20 },
21 path::{Path, PathKind}, 21 path::{Path, PathKind},
22 AdtId, AstId, AstItemDef, ConstId, CrateModuleId, EnumId, EnumVariantId, FunctionContainerId, 22 AdtId, AstId, AstItemDef, ConstId, ContainerId, CrateModuleId, EnumId, EnumVariantId,
23 FunctionLoc, ImplId, Intern, LocationCtx, ModuleDefId, ModuleId, StaticId, StructId, 23 FunctionLoc, ImplId, Intern, LocationCtx, ModuleDefId, ModuleId, StaticId, StructId,
24 StructOrUnionId, TraitId, TypeAliasContainerId, TypeAliasLoc, UnionId, 24 StructOrUnionId, TraitId, TypeAliasLoc, UnionId,
25}; 25};
26 26
27pub(super) fn collect_defs(db: &impl DefDatabase2, mut def_map: CrateDefMap) -> CrateDefMap { 27pub(super) fn collect_defs(db: &impl DefDatabase2, mut def_map: CrateDefMap) -> CrateDefMap {
@@ -674,7 +674,7 @@ where
674 let def: PerNs = match def.kind { 674 let def: PerNs = match def.kind {
675 raw::DefKind::Function(ast_id) => { 675 raw::DefKind::Function(ast_id) => {
676 let def = FunctionLoc { 676 let def = FunctionLoc {
677 container: FunctionContainerId::ModuleId(module), 677 container: ContainerId::ModuleId(module),
678 ast_id: AstId::new(self.file_id, ast_id), 678 ast_id: AstId::new(self.file_id, ast_id),
679 } 679 }
680 .intern(self.def_collector.db); 680 .intern(self.def_collector.db);
@@ -699,7 +699,7 @@ where
699 raw::DefKind::Trait(ast_id) => PerNs::types(TraitId::from_ast_id(ctx, ast_id).into()), 699 raw::DefKind::Trait(ast_id) => PerNs::types(TraitId::from_ast_id(ctx, ast_id).into()),
700 raw::DefKind::TypeAlias(ast_id) => { 700 raw::DefKind::TypeAlias(ast_id) => {
701 let def = TypeAliasLoc { 701 let def = TypeAliasLoc {
702 container: TypeAliasContainerId::ModuleId(module), 702 container: ContainerId::ModuleId(module),
703 ast_id: AstId::new(self.file_id, ast_id), 703 ast_id: AstId::new(self.file_id, ast_id),
704 } 704 }
705 .intern(self.def_collector.db); 705 .intern(self.def_collector.db);