aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-12 13:25:59 +0000
committerGitHub <[email protected]>2019-12-12 13:25:59 +0000
commitd8dba7fbe587ba5fb6cfe939083ccd92c61f5827 (patch)
treec50b695604c7d418fc107775b9ec3a6845062751 /crates/ra_hir_def/src/nameres
parentb2638fcd2cc847e008e1dd7f1739283813b94026 (diff)
parent7b0644d81e52d00a7a6795b187f356213ff68225 (diff)
Merge #2537
2537: Switch to the new location for impls r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/nameres')
-rw-r--r--crates/ra_hir_def/src/nameres/collector.rs10
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 }