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_ty/Cargo.toml | 2 +- crates/ra_hir_ty/src/autoderef.rs | 2 +- crates/ra_hir_ty/src/db.rs | 2 +- crates/ra_hir_ty/src/diagnostics.rs | 2 +- crates/ra_hir_ty/src/lib.rs | 2 +- crates/ra_hir_ty/src/lower.rs | 2 +- crates/ra_hir_ty/src/method_resolution.rs | 2 +- crates/ra_hir_ty/src/test_db.rs | 6 +++--- crates/ra_hir_ty/src/tests.rs | 2 +- crates/ra_hir_ty/src/traits.rs | 2 +- crates/ra_hir_ty/src/traits/chalk.rs | 2 +- crates/ra_hir_ty/src/traits/chalk/interner.rs | 2 +- crates/ra_hir_ty/src/traits/chalk/mapping.rs | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) (limited to 'crates/ra_hir_ty') diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml index 6156e4a85..720d171ac 100644 --- a/crates/ra_hir_ty/Cargo.toml +++ b/crates/ra_hir_ty/Cargo.toml @@ -21,7 +21,7 @@ stdx = { path = "../stdx" } hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } arena = { path = "../arena" } -ra_db = { path = "../ra_db" } +base_db = { path = "../base_db" } profile = { path = "../profile" } syntax = { path = "../syntax" } test_utils = { path = "../test_utils" } diff --git a/crates/ra_hir_ty/src/autoderef.rs b/crates/ra_hir_ty/src/autoderef.rs index c727012c6..ece68183e 100644 --- a/crates/ra_hir_ty/src/autoderef.rs +++ b/crates/ra_hir_ty/src/autoderef.rs @@ -5,10 +5,10 @@ use std::iter::successors; +use base_db::CrateId; use hir_def::lang_item::LangItemTarget; use hir_expand::name::name; use log::{info, warn}; -use ra_db::CrateId; use crate::{ db::HirDatabase, diff --git a/crates/ra_hir_ty/src/db.rs b/crates/ra_hir_ty/src/db.rs index 7a28673b1..25cf9eb7f 100644 --- a/crates/ra_hir_ty/src/db.rs +++ b/crates/ra_hir_ty/src/db.rs @@ -3,11 +3,11 @@ use std::sync::Arc; use arena::map::ArenaMap; +use base_db::{impl_intern_key, salsa, CrateId, Upcast}; use hir_def::{ db::DefDatabase, expr::ExprId, DefWithBodyId, FunctionId, GenericDefId, ImplId, LocalFieldId, TypeParamId, VariantId, }; -use ra_db::{impl_intern_key, salsa, CrateId, Upcast}; use crate::{ method_resolution::{InherentImpls, TraitImpls}, diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs index bf35d2d0e..ae0cf8d09 100644 --- a/crates/ra_hir_ty/src/diagnostics.rs +++ b/crates/ra_hir_ty/src/diagnostics.rs @@ -208,12 +208,12 @@ impl Diagnostic for MismatchedArgCount { #[cfg(test)] mod tests { + use base_db::{fixture::WithFixture, FileId, SourceDatabase, SourceDatabaseExt}; use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId}; use hir_expand::{ db::AstDatabase, diagnostics::{Diagnostic, DiagnosticSinkBuilder}, }; - use ra_db::{fixture::WithFixture, FileId, SourceDatabase, SourceDatabaseExt}; use rustc_hash::FxHashMap; use syntax::{TextRange, TextSize}; diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs index 7698cb0d4..1e748476a 100644 --- a/crates/ra_hir_ty/src/lib.rs +++ b/crates/ra_hir_ty/src/lib.rs @@ -26,6 +26,7 @@ mod test_db; use std::{iter, mem, ops::Deref, sync::Arc}; +use base_db::{salsa, CrateId}; use hir_def::{ expr::ExprId, type_ref::{Mutability, Rawness}, @@ -33,7 +34,6 @@ use hir_def::{ TypeParamId, }; use itertools::Itertools; -use ra_db::{salsa, CrateId}; use crate::{ db::HirDatabase, diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs index 7b805fe7a..cd574e983 100644 --- a/crates/ra_hir_ty/src/lower.rs +++ b/crates/ra_hir_ty/src/lower.rs @@ -8,6 +8,7 @@ use std::{iter, sync::Arc}; use arena::map::ArenaMap; +use base_db::CrateId; use hir_def::{ adt::StructKind, builtin_type::BuiltinType, @@ -20,7 +21,6 @@ use hir_def::{ UnionId, VariantId, }; use hir_expand::name::Name; -use ra_db::CrateId; use smallvec::SmallVec; use stdx::impl_from; use test_utils::mark; diff --git a/crates/ra_hir_ty/src/method_resolution.rs b/crates/ra_hir_ty/src/method_resolution.rs index 3b3bee6a7..ec59145c7 100644 --- a/crates/ra_hir_ty/src/method_resolution.rs +++ b/crates/ra_hir_ty/src/method_resolution.rs @@ -5,6 +5,7 @@ use std::{iter, sync::Arc}; use arrayvec::ArrayVec; +use base_db::CrateId; use hir_def::{ builtin_type::{IntBitness, Signedness}, lang_item::LangItemTarget, @@ -12,7 +13,6 @@ use hir_def::{ AssocContainerId, AssocItemId, FunctionId, HasModule, ImplId, Lookup, TraitId, }; use hir_expand::name::Name; -use ra_db::CrateId; use rustc_hash::{FxHashMap, FxHashSet}; use super::Substs; diff --git a/crates/ra_hir_ty/src/test_db.rs b/crates/ra_hir_ty/src/test_db.rs index 0e2a69eec..15b8435e9 100644 --- a/crates/ra_hir_ty/src/test_db.rs +++ b/crates/ra_hir_ty/src/test_db.rs @@ -5,16 +5,16 @@ use std::{ sync::{Arc, Mutex}, }; +use base_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast}; use hir_def::{db::DefDatabase, ModuleId}; use hir_expand::db::AstDatabase; -use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast}; use rustc_hash::{FxHashMap, FxHashSet}; use syntax::TextRange; use test_utils::extract_annotations; #[salsa::database( - ra_db::SourceDatabaseExtStorage, - ra_db::SourceDatabaseStorage, + base_db::SourceDatabaseExtStorage, + base_db::SourceDatabaseStorage, hir_expand::db::AstDatabaseStorage, hir_def::db::InternDatabaseStorage, hir_def::db::DefDatabaseStorage, diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs index 5f6f8869a..f6b172c3a 100644 --- a/crates/ra_hir_ty/src/tests.rs +++ b/crates/ra_hir_ty/src/tests.rs @@ -10,6 +10,7 @@ mod display_source_code; use std::sync::Arc; +use base_db::{fixture::WithFixture, FileRange, SourceDatabase, SourceDatabaseExt}; use expect::Expect; use hir_def::{ body::{BodySourceMap, SyntheticSyntax}, @@ -21,7 +22,6 @@ use hir_def::{ AssocItemId, DefWithBodyId, LocalModuleId, Lookup, ModuleDefId, }; use hir_expand::{db::AstDatabase, InFile}; -use ra_db::{fixture::WithFixture, FileRange, SourceDatabase, SourceDatabaseExt}; use stdx::format_to; use syntax::{ algo, diff --git a/crates/ra_hir_ty/src/traits.rs b/crates/ra_hir_ty/src/traits.rs index 2576a9dfc..255323717 100644 --- a/crates/ra_hir_ty/src/traits.rs +++ b/crates/ra_hir_ty/src/traits.rs @@ -1,10 +1,10 @@ //! Trait solving using Chalk. use std::sync::Arc; +use base_db::CrateId; use chalk_ir::cast::Cast; use chalk_solve::Solver; use hir_def::{lang_item::LangItemTarget, TraitId}; -use ra_db::CrateId; use crate::{db::HirDatabase, DebruijnIndex, Substs}; diff --git a/crates/ra_hir_ty/src/traits/chalk.rs b/crates/ra_hir_ty/src/traits/chalk.rs index 3b6af5c9a..b33653417 100644 --- a/crates/ra_hir_ty/src/traits/chalk.rs +++ b/crates/ra_hir_ty/src/traits/chalk.rs @@ -6,11 +6,11 @@ use log::debug; use chalk_ir::{fold::shift::Shift, CanonicalVarKinds, GenericArg, TypeName}; use chalk_solve::rust_ir::{self, OpaqueTyDatumBound, WellKnownTrait}; +use base_db::{salsa::InternKey, CrateId}; use hir_def::{ lang_item::{lang_attr, LangItemTarget}, AssocContainerId, AssocItemId, HasModule, Lookup, TypeAliasId, }; -use ra_db::{salsa::InternKey, CrateId}; use super::ChalkContext; use crate::{ diff --git a/crates/ra_hir_ty/src/traits/chalk/interner.rs b/crates/ra_hir_ty/src/traits/chalk/interner.rs index 8d4c51a8f..fc0f9c201 100644 --- a/crates/ra_hir_ty/src/traits/chalk/interner.rs +++ b/crates/ra_hir_ty/src/traits/chalk/interner.rs @@ -2,9 +2,9 @@ //! representation of the various objects Chalk deals with (types, goals etc.). use super::tls; +use base_db::salsa::InternId; use chalk_ir::{GenericArg, Goal, GoalData}; use hir_def::TypeAliasId; -use ra_db::salsa::InternId; use std::{fmt, sync::Arc}; #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] diff --git a/crates/ra_hir_ty/src/traits/chalk/mapping.rs b/crates/ra_hir_ty/src/traits/chalk/mapping.rs index b3e92993d..fe62f3fa7 100644 --- a/crates/ra_hir_ty/src/traits/chalk/mapping.rs +++ b/crates/ra_hir_ty/src/traits/chalk/mapping.rs @@ -9,8 +9,8 @@ use chalk_ir::{ }; use chalk_solve::rust_ir; +use base_db::salsa::InternKey; use hir_def::{type_ref::Mutability, AssocContainerId, GenericDefId, Lookup, TypeAliasId}; -use ra_db::salsa::InternKey; use crate::{ db::HirDatabase, -- cgit v1.2.3 From b7aa4898e0841ab8199643f89a0caa967b698ca8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 16:26:29 +0200 Subject: Rename ra_hir_expand -> hir_expand --- crates/ra_hir_ty/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir_ty') diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml index 720d171ac..75f04f9dd 100644 --- a/crates/ra_hir_ty/Cargo.toml +++ b/crates/ra_hir_ty/Cargo.toml @@ -19,7 +19,7 @@ rustc-hash = "1.1.0" stdx = { path = "../stdx" } hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } -hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } +hir_expand = { path = "../hir_expand" } arena = { path = "../arena" } base_db = { path = "../base_db" } profile = { path = "../profile" } -- cgit v1.2.3 From b28c54a2c239acd73f2eea80fda9ee3960d2c046 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 16:28:27 +0200 Subject: Rename ra_hir_def -> hir_def --- crates/ra_hir_ty/Cargo.toml | 2 +- crates/ra_hir_ty/src/tests/simple.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir_ty') diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml index 75f04f9dd..d430b08ca 100644 --- a/crates/ra_hir_ty/Cargo.toml +++ b/crates/ra_hir_ty/Cargo.toml @@ -18,7 +18,7 @@ rustc-hash = "1.1.0" stdx = { path = "../stdx" } -hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } +hir_def = { path = "../hir_def" } hir_expand = { path = "../hir_expand" } arena = { path = "../arena" } base_db = { path = "../base_db" } diff --git a/crates/ra_hir_ty/src/tests/simple.rs b/crates/ra_hir_ty/src/tests/simple.rs index 5a7cf9455..59eb59d5f 100644 --- a/crates/ra_hir_ty/src/tests/simple.rs +++ b/crates/ra_hir_ty/src/tests/simple.rs @@ -1776,8 +1776,8 @@ fn main() { ); } -// This test is actually testing the shadowing behavior within ra_hir_def. It -// lives here because the testing infrastructure in ra_hir_def isn't currently +// This test is actually testing the shadowing behavior within hir_def. It +// lives here because the testing infrastructure in hir_def isn't currently // capable of asserting the necessary conditions. #[test] fn should_be_shadowing_imports() { -- cgit v1.2.3