diff options
author | Aleksey Kladov <[email protected]> | 2019-12-12 13:58:04 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-12 13:58:04 +0000 |
commit | f135a8ea55c0a46c67713fb3b79b5f62ada430c1 (patch) | |
tree | a71a0c4da21cb40c35b6aed842d9664cbec8a59d /crates/ra_hir_def/src/nameres | |
parent | 63c192b34a54e826afebc735ca6225b44a876eab (diff) |
Move structs to new loc
Diffstat (limited to 'crates/ra_hir_def/src/nameres')
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index a7bdd620b..602ec0911 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs | |||
@@ -25,7 +25,7 @@ use crate::{ | |||
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, 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, StructLoc, |
29 | TraitLoc, TypeAliasLoc, UnionId, | 29 | TraitLoc, TypeAliasLoc, UnionId, |
30 | }; | 30 | }; |
31 | 31 | ||
@@ -773,8 +773,9 @@ where | |||
773 | PerNs::values(def.into()) | 773 | PerNs::values(def.into()) |
774 | } | 774 | } |
775 | raw::DefKind::Struct(ast_id) => { | 775 | raw::DefKind::Struct(ast_id) => { |
776 | let id = StructId::from_ast_id(ctx, ast_id).into(); | 776 | let def = StructLoc { container: module, ast_id: AstId::new(self.file_id, ast_id) } |
777 | PerNs::both(id, id) | 777 | .intern(self.def_collector.db); |
778 | PerNs::both(def.into(), def.into()) | ||
778 | } | 779 | } |
779 | raw::DefKind::Union(ast_id) => { | 780 | raw::DefKind::Union(ast_id) => { |
780 | let id = UnionId::from_ast_id(ctx, ast_id).into(); | 781 | let id = UnionId::from_ast_id(ctx, ast_id).into(); |