diff options
author | Jonas Schievink <[email protected]> | 2020-06-16 18:20:29 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-06-24 15:53:16 +0100 |
commit | 864b650f92388f4e82d130713b2de9afe637102f (patch) | |
tree | 69992bdf294e113fec48bb7f1eb55804143c4d06 /crates/ra_hir_def/src/nameres/collector.rs | |
parent | 278556f9fe8240f0c76daaaf8dcf7ee7f516e4af (diff) |
ItemTree: use a newtyped ID
Diffstat (limited to 'crates/ra_hir_def/src/nameres/collector.rs')
-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 b899a5fb3..c227b6da1 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs | |||
@@ -20,7 +20,9 @@ use test_utils::mark; | |||
20 | use crate::{ | 20 | use crate::{ |
21 | attr::Attrs, | 21 | attr::Attrs, |
22 | db::DefDatabase, | 22 | db::DefDatabase, |
23 | item_tree::{Import, ItemTree, MacroCall, Mod, ModItem, ModKind, StructDefKind}, | 23 | item_tree::{ |
24 | FileItemTreeId, Import, ItemTree, MacroCall, Mod, ModItem, ModKind, StructDefKind, | ||
25 | }, | ||
24 | nameres::{ | 26 | nameres::{ |
25 | diagnostics::DefDiagnostic, mod_resolution::ModDir, path_resolution::ReachedFixedPoint, | 27 | diagnostics::DefDiagnostic, mod_resolution::ModDir, path_resolution::ReachedFixedPoint, |
26 | BuiltinShadowMode, CrateDefMap, ModuleData, ModuleOrigin, ResolveMode, | 28 | BuiltinShadowMode, CrateDefMap, ModuleData, ModuleOrigin, ResolveMode, |
@@ -32,7 +34,6 @@ use crate::{ | |||
32 | FunctionLoc, ImplLoc, Intern, LocalModuleId, ModuleDefId, ModuleId, StaticLoc, StructLoc, | 34 | FunctionLoc, ImplLoc, Intern, LocalModuleId, ModuleDefId, ModuleId, StaticLoc, StructLoc, |
33 | TraitLoc, TypeAliasLoc, UnionLoc, | 35 | TraitLoc, TypeAliasLoc, UnionLoc, |
34 | }; | 36 | }; |
35 | use ra_arena::Idx; | ||
36 | 37 | ||
37 | pub(super) fn collect_defs(db: &dyn DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { | 38 | pub(super) fn collect_defs(db: &dyn DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { |
38 | let crate_graph = db.crate_graph(); | 39 | let crate_graph = db.crate_graph(); |
@@ -107,7 +108,7 @@ impl PartialResolvedImport { | |||
107 | #[derive(Clone, Debug, Eq, PartialEq)] | 108 | #[derive(Clone, Debug, Eq, PartialEq)] |
108 | struct ImportDirective { | 109 | struct ImportDirective { |
109 | module_id: LocalModuleId, | 110 | module_id: LocalModuleId, |
110 | import_id: Idx<Import>, | 111 | import_id: FileItemTreeId<Import>, |
111 | import: Import, | 112 | import: Import, |
112 | status: PartialResolvedImport, | 113 | status: PartialResolvedImport, |
113 | } | 114 | } |