diff options
author | Aleksey Kladov <[email protected]> | 2019-12-12 13:34:03 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-12 13:36:14 +0000 |
commit | 82e9b245587046d2a1ed432225b19023adbe3245 (patch) | |
tree | acabb715858003dcab9af2810065b8fe40095e90 /crates/ra_hir_def/src/nameres/collector.rs | |
parent | 7b0644d81e52d00a7a6795b187f356213ff68225 (diff) |
Move traits to the new loc
Diffstat (limited to 'crates/ra_hir_def/src/nameres/collector.rs')
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index b33507a9a..a7bdd620b 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs | |||
@@ -26,7 +26,7 @@ use crate::{ | |||
26 | per_ns::PerNs, | 26 | per_ns::PerNs, |
27 | AdtId, AstId, AstItemDef, ConstLoc, ContainerId, EnumId, EnumVariantId, FunctionLoc, ImplLoc, | 27 | AdtId, AstId, AstItemDef, ConstLoc, ContainerId, EnumId, EnumVariantId, FunctionLoc, ImplLoc, |
28 | Intern, LocalImportId, LocalModuleId, LocationCtx, ModuleDefId, ModuleId, StaticLoc, StructId, | 28 | Intern, LocalImportId, LocalModuleId, LocationCtx, ModuleDefId, ModuleId, StaticLoc, StructId, |
29 | TraitId, TypeAliasLoc, UnionId, | 29 | TraitLoc, TypeAliasLoc, UnionId, |
30 | }; | 30 | }; |
31 | 31 | ||
32 | pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { | 32 | pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { |
@@ -796,7 +796,12 @@ where | |||
796 | 796 | ||
797 | PerNs::values(def.into()) | 797 | PerNs::values(def.into()) |
798 | } | 798 | } |
799 | raw::DefKind::Trait(ast_id) => PerNs::types(TraitId::from_ast_id(ctx, ast_id).into()), | 799 | raw::DefKind::Trait(ast_id) => { |
800 | let def = TraitLoc { container: module, ast_id: AstId::new(self.file_id, ast_id) } | ||
801 | .intern(self.def_collector.db); | ||
802 | |||
803 | PerNs::types(def.into()) | ||
804 | } | ||
800 | raw::DefKind::TypeAlias(ast_id) => { | 805 | raw::DefKind::TypeAlias(ast_id) => { |
801 | let def = TypeAliasLoc { | 806 | let def = TypeAliasLoc { |
802 | container: ContainerId::ModuleId(module), | 807 | container: ContainerId::ModuleId(module), |