diff options
author | Aleksey Kladov <[email protected]> | 2019-12-12 13:09:13 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-12 13:25:34 +0000 |
commit | 7b0644d81e52d00a7a6795b187f356213ff68225 (patch) | |
tree | 88da767605960bb672934c091489d3aad826f17a /crates/ra_hir_def/src/nameres/collector.rs | |
parent | b0739d5a26684527129882b7d182d01e635525bc (diff) |
Switch to the new location for impls
Diffstat (limited to 'crates/ra_hir_def/src/nameres/collector.rs')
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index a80067979..b33507a9a 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs | |||
@@ -24,7 +24,7 @@ use crate::{ | |||
24 | }, | 24 | }, |
25 | path::{Path, PathKind}, | 25 | path::{Path, PathKind}, |
26 | per_ns::PerNs, | 26 | per_ns::PerNs, |
27 | AdtId, AstId, AstItemDef, ConstLoc, ContainerId, EnumId, EnumVariantId, FunctionLoc, ImplId, | 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 | TraitId, TypeAliasLoc, UnionId, |
30 | }; | 30 | }; |
@@ -661,9 +661,11 @@ where | |||
661 | krate: self.def_collector.def_map.krate, | 661 | krate: self.def_collector.def_map.krate, |
662 | local_id: self.module_id, | 662 | local_id: self.module_id, |
663 | }; | 663 | }; |
664 | let ctx = LocationCtx::new(self.def_collector.db, module, self.file_id); | 664 | let ast_id = self.raw_items[imp].ast_id; |
665 | let imp_id = ImplId::from_ast_id(ctx, self.raw_items[imp].ast_id); | 665 | let impl_id = |
666 | self.def_collector.def_map.modules[self.module_id].impls.push(imp_id) | 666 | ImplLoc { container: module, ast_id: AstId::new(self.file_id, ast_id) } |
667 | .intern(self.def_collector.db); | ||
668 | self.def_collector.def_map.modules[self.module_id].impls.push(impl_id) | ||
667 | } | 669 | } |
668 | } | 670 | } |
669 | } | 671 | } |