From 4dffdcf14abe0c79f9d7a9702be77958be1f75b1 Mon Sep 17 00:00:00 2001 From: csmoe Date: Fri, 1 Feb 2019 18:33:41 +0800 Subject: split HirDatabase api --- crates/ra_hir/src/nameres/lower.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/ra_hir/src/nameres/lower.rs') diff --git a/crates/ra_hir/src/nameres/lower.rs b/crates/ra_hir/src/nameres/lower.rs index 8df11a5f4..9a45fa61c 100644 --- a/crates/ra_hir/src/nameres/lower.rs +++ b/crates/ra_hir/src/nameres/lower.rs @@ -8,10 +8,10 @@ use ra_arena::{Arena, RawId, impl_arena_id, map::ArenaMap}; use rustc_hash::FxHashMap; use crate::{ - SourceItemId, Path, ModuleSource, HirDatabase, Name, + SourceItemId, Path, ModuleSource, Name, HirFileId, MacroCallLoc, AsName, PerNs, Function, ModuleDef, Module, Struct, Enum, Const, Static, Trait, Type, - ids::LocationCtx, + ids::LocationCtx, PersistentHirDatabase, }; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] @@ -58,21 +58,21 @@ impl ImportSourceMap { impl LoweredModule { pub(crate) fn lower_module_module_query( - db: &impl HirDatabase, + db: &impl PersistentHirDatabase, module: Module, ) -> Arc { db.lower_module(module).0 } pub(crate) fn lower_module_source_map_query( - db: &impl HirDatabase, + db: &impl PersistentHirDatabase, module: Module, ) -> Arc { db.lower_module(module).1 } pub(crate) fn lower_module_query( - db: &impl HirDatabase, + db: &impl PersistentHirDatabase, module: Module, ) -> (Arc, Arc) { let (file_id, source) = module.definition_source(db); @@ -105,7 +105,7 @@ impl LoweredModule { fn fill( &mut self, source_map: &mut ImportSourceMap, - db: &impl HirDatabase, + db: &impl PersistentHirDatabase, module: Module, file_id: HirFileId, items: &mut Iterator, @@ -137,7 +137,7 @@ impl LoweredModule { fn add_def_id( &mut self, source_map: &mut ImportSourceMap, - db: &impl HirDatabase, + db: &impl PersistentHirDatabase, module: Module, file_id: HirFileId, item: &ast::ModuleItem, -- cgit v1.2.3