From ed20a857f485a471369cd99b843af19a4d875ad0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 16:25:38 +0200 Subject: Rename ra_db -> base_db --- crates/ra_hir_def/src/body.rs | 4 ++-- crates/ra_hir_def/src/body/scope.rs | 2 +- crates/ra_hir_def/src/db.rs | 2 +- crates/ra_hir_def/src/find_path.rs | 2 +- crates/ra_hir_def/src/generics.rs | 2 +- crates/ra_hir_def/src/import_map.rs | 4 ++-- crates/ra_hir_def/src/item_scope.rs | 2 +- crates/ra_hir_def/src/item_tree/tests.rs | 2 +- crates/ra_hir_def/src/lib.rs | 2 +- crates/ra_hir_def/src/nameres.rs | 2 +- crates/ra_hir_def/src/nameres/collector.rs | 4 ++-- crates/ra_hir_def/src/nameres/mod_resolution.rs | 2 +- crates/ra_hir_def/src/nameres/path_resolution.rs | 2 +- crates/ra_hir_def/src/nameres/tests.rs | 2 +- crates/ra_hir_def/src/nameres/tests/incremental.rs | 2 +- crates/ra_hir_def/src/path.rs | 2 +- crates/ra_hir_def/src/resolver.rs | 2 +- crates/ra_hir_def/src/test_db.rs | 6 +++--- 18 files changed, 23 insertions(+), 23 deletions(-) (limited to 'crates/ra_hir_def/src') diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs index fe659386a..9a9a605dd 100644 --- a/crates/ra_hir_def/src/body.rs +++ b/crates/ra_hir_def/src/body.rs @@ -6,11 +6,11 @@ pub mod scope; use std::{mem, ops::Index, sync::Arc}; use arena::{map::ArenaMap, Arena}; +use base_db::CrateId; use cfg::CfgOptions; use drop_bomb::DropBomb; use either::Either; use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId}; -use ra_db::CrateId; use rustc_hash::FxHashMap; use syntax::{ast, AstNode, AstPtr}; use test_utils::mark; @@ -320,7 +320,7 @@ impl BodySourceMap { #[cfg(test)] mod tests { - use ra_db::{fixture::WithFixture, SourceDatabase}; + use base_db::{fixture::WithFixture, SourceDatabase}; use test_utils::mark; use crate::ModuleDefId; diff --git a/crates/ra_hir_def/src/body/scope.rs b/crates/ra_hir_def/src/body/scope.rs index 079f14c29..9142bc05b 100644 --- a/crates/ra_hir_def/src/body/scope.rs +++ b/crates/ra_hir_def/src/body/scope.rs @@ -169,8 +169,8 @@ fn compute_expr_scopes(expr: ExprId, body: &Body, scopes: &mut ExprScopes, scope #[cfg(test)] mod tests { + use base_db::{fixture::WithFixture, FileId, SourceDatabase}; use hir_expand::{name::AsName, InFile}; - use ra_db::{fixture::WithFixture, FileId, SourceDatabase}; use syntax::{algo::find_node_at_offset, ast, AstNode}; use test_utils::{assert_eq_text, extract_offset, mark}; diff --git a/crates/ra_hir_def/src/db.rs b/crates/ra_hir_def/src/db.rs index a925548b5..6d694de11 100644 --- a/crates/ra_hir_def/src/db.rs +++ b/crates/ra_hir_def/src/db.rs @@ -1,8 +1,8 @@ //! Defines database & queries for name resolution. use std::sync::Arc; +use base_db::{salsa, CrateId, SourceDatabase, Upcast}; use hir_expand::{db::AstDatabase, HirFileId}; -use ra_db::{salsa, CrateId, SourceDatabase, Upcast}; use syntax::SmolStr; use crate::{ diff --git a/crates/ra_hir_def/src/find_path.rs b/crates/ra_hir_def/src/find_path.rs index 5099f417d..ac2c54ac5 100644 --- a/crates/ra_hir_def/src/find_path.rs +++ b/crates/ra_hir_def/src/find_path.rs @@ -292,8 +292,8 @@ fn find_local_import_locations( #[cfg(test)] mod tests { + use base_db::fixture::WithFixture; use hir_expand::hygiene::Hygiene; - use ra_db::fixture::WithFixture; use syntax::ast::AstNode; use test_utils::mark; diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs index 4476f0316..835fe3fbd 100644 --- a/crates/ra_hir_def/src/generics.rs +++ b/crates/ra_hir_def/src/generics.rs @@ -5,12 +5,12 @@ use std::sync::Arc; use arena::{map::ArenaMap, Arena}; +use base_db::FileId; use either::Either; use hir_expand::{ name::{name, AsName, Name}, InFile, }; -use ra_db::FileId; use syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner}; use crate::{ diff --git a/crates/ra_hir_def/src/import_map.rs b/crates/ra_hir_def/src/import_map.rs index 431ff30ab..d32a0bdaf 100644 --- a/crates/ra_hir_def/src/import_map.rs +++ b/crates/ra_hir_def/src/import_map.rs @@ -2,9 +2,9 @@ use std::{cmp::Ordering, fmt, hash::BuildHasherDefault, sync::Arc}; +use base_db::CrateId; use fst::{self, Streamer}; use indexmap::{map::Entry, IndexMap}; -use ra_db::CrateId; use rustc_hash::{FxHashMap, FxHasher}; use smallvec::SmallVec; use syntax::SmolStr; @@ -327,8 +327,8 @@ pub fn search_dependencies<'a>( #[cfg(test)] mod tests { + use base_db::{fixture::WithFixture, SourceDatabase, Upcast}; use expect::{expect, Expect}; - use ra_db::{fixture::WithFixture, SourceDatabase, Upcast}; use crate::{test_db::TestDB, AssocContainerId, Lookup}; diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs index 8fee4b15e..f1e9dfd5b 100644 --- a/crates/ra_hir_def/src/item_scope.rs +++ b/crates/ra_hir_def/src/item_scope.rs @@ -3,9 +3,9 @@ use std::collections::hash_map::Entry; +use base_db::CrateId; use hir_expand::name::Name; use once_cell::sync::Lazy; -use ra_db::CrateId; use rustc_hash::{FxHashMap, FxHashSet}; use test_utils::mark; diff --git a/crates/ra_hir_def/src/item_tree/tests.rs b/crates/ra_hir_def/src/item_tree/tests.rs index 6c843e339..2f62eddcb 100644 --- a/crates/ra_hir_def/src/item_tree/tests.rs +++ b/crates/ra_hir_def/src/item_tree/tests.rs @@ -1,6 +1,6 @@ +use base_db::fixture::WithFixture; use expect::{expect, Expect}; use hir_expand::{db::AstDatabase, HirFileId, InFile}; -use ra_db::fixture::WithFixture; use rustc_hash::FxHashSet; use std::sync::Arc; use stdx::format_to; diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs index 806ac731f..f24a1dd77 100644 --- a/crates/ra_hir_def/src/lib.rs +++ b/crates/ra_hir_def/src/lib.rs @@ -53,11 +53,11 @@ mod test_db; use std::hash::{Hash, Hasher}; use arena::Idx; +use base_db::{impl_intern_key, salsa, CrateId}; use hir_expand::{ ast_id_map::FileAstId, eager::expand_eager_macro, hygiene::Hygiene, AstId, HirFileId, InFile, MacroCallId, MacroCallKind, MacroDefId, MacroDefKind, }; -use ra_db::{impl_intern_key, salsa, CrateId}; use syntax::ast; use crate::builtin_type::BuiltinType; diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs index d26c837cc..bf302172d 100644 --- a/crates/ra_hir_def/src/nameres.rs +++ b/crates/ra_hir_def/src/nameres.rs @@ -57,8 +57,8 @@ mod tests; use std::sync::Arc; use arena::Arena; +use base_db::{CrateId, Edition, FileId}; use hir_expand::{diagnostics::DiagnosticSink, name::Name, InFile}; -use ra_db::{CrateId, Edition, FileId}; use rustc_hash::FxHashMap; use stdx::format_to; use syntax::ast; diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index 6a5891936..3e99c8773 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs @@ -3,6 +3,7 @@ //! `DefCollector::collect` contains the fixed-point iteration loop which //! resolves imports and expands macros. +use base_db::{CrateId, FileId, ProcMacroId}; use cfg::CfgOptions; use hir_expand::{ ast_id_map::FileAstId, @@ -12,7 +13,6 @@ use hir_expand::{ proc_macro::ProcMacroExpander, HirFileId, MacroCallId, MacroDefId, MacroDefKind, }; -use ra_db::{CrateId, FileId, ProcMacroId}; use rustc_hash::FxHashMap; use syntax::ast; use test_utils::mark; @@ -1209,7 +1209,7 @@ fn is_macro_rules(path: &ModPath) -> bool { mod tests { use crate::{db::DefDatabase, test_db::TestDB}; use arena::Arena; - use ra_db::{fixture::WithFixture, SourceDatabase}; + use base_db::{fixture::WithFixture, SourceDatabase}; use super::*; diff --git a/crates/ra_hir_def/src/nameres/mod_resolution.rs b/crates/ra_hir_def/src/nameres/mod_resolution.rs index 316245d6b..e8389b484 100644 --- a/crates/ra_hir_def/src/nameres/mod_resolution.rs +++ b/crates/ra_hir_def/src/nameres/mod_resolution.rs @@ -1,6 +1,6 @@ //! This module resolves `mod foo;` declaration to file. +use base_db::FileId; use hir_expand::name::Name; -use ra_db::FileId; use syntax::SmolStr; use crate::{db::DefDatabase, HirFileId}; diff --git a/crates/ra_hir_def/src/nameres/path_resolution.rs b/crates/ra_hir_def/src/nameres/path_resolution.rs index dbfa7fccb..88e10574e 100644 --- a/crates/ra_hir_def/src/nameres/path_resolution.rs +++ b/crates/ra_hir_def/src/nameres/path_resolution.rs @@ -12,8 +12,8 @@ use std::iter::successors; +use base_db::Edition; use hir_expand::name::Name; -use ra_db::Edition; use test_utils::mark; use crate::{ diff --git a/crates/ra_hir_def/src/nameres/tests.rs b/crates/ra_hir_def/src/nameres/tests.rs index 839b1de57..b105d56b2 100644 --- a/crates/ra_hir_def/src/nameres/tests.rs +++ b/crates/ra_hir_def/src/nameres/tests.rs @@ -6,8 +6,8 @@ mod primitives; use std::sync::Arc; +use base_db::{fixture::WithFixture, SourceDatabase}; use expect::{expect, Expect}; -use ra_db::{fixture::WithFixture, SourceDatabase}; use test_utils::mark; use crate::{db::DefDatabase, nameres::*, test_db::TestDB}; diff --git a/crates/ra_hir_def/src/nameres/tests/incremental.rs b/crates/ra_hir_def/src/nameres/tests/incremental.rs index 0c288a108..cfbc62cc4 100644 --- a/crates/ra_hir_def/src/nameres/tests/incremental.rs +++ b/crates/ra_hir_def/src/nameres/tests/incremental.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use ra_db::SourceDatabaseExt; +use base_db::SourceDatabaseExt; use super::*; diff --git a/crates/ra_hir_def/src/path.rs b/crates/ra_hir_def/src/path.rs index 88be07c8a..74d26f08b 100644 --- a/crates/ra_hir_def/src/path.rs +++ b/crates/ra_hir_def/src/path.rs @@ -8,11 +8,11 @@ use std::{ }; use crate::body::LowerCtx; +use base_db::CrateId; use hir_expand::{ hygiene::Hygiene, name::{AsName, Name}, }; -use ra_db::CrateId; use syntax::ast; use crate::{ diff --git a/crates/ra_hir_def/src/resolver.rs b/crates/ra_hir_def/src/resolver.rs index 0bf51eb7b..f8cc5e075 100644 --- a/crates/ra_hir_def/src/resolver.rs +++ b/crates/ra_hir_def/src/resolver.rs @@ -1,11 +1,11 @@ //! Name resolution façade. use std::sync::Arc; +use base_db::CrateId; use hir_expand::{ name::{name, Name}, MacroDefId, }; -use ra_db::CrateId; use rustc_hash::FxHashSet; use crate::{ diff --git a/crates/ra_hir_def/src/test_db.rs b/crates/ra_hir_def/src/test_db.rs index 339f819b8..42a762936 100644 --- a/crates/ra_hir_def/src/test_db.rs +++ b/crates/ra_hir_def/src/test_db.rs @@ -5,15 +5,15 @@ use std::{ sync::{Arc, Mutex}, }; +use base_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, Upcast}; use hir_expand::db::AstDatabase; -use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, Upcast}; use rustc_hash::FxHashSet; use crate::db::DefDatabase; #[salsa::database( - ra_db::SourceDatabaseExtStorage, - ra_db::SourceDatabaseStorage, + base_db::SourceDatabaseExtStorage, + base_db::SourceDatabaseStorage, hir_expand::db::AstDatabaseStorage, crate::db::InternDatabaseStorage, crate::db::DefDatabaseStorage -- cgit v1.2.3