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_expand/src/builtin_derive.rs | 2 +- crates/ra_hir_expand/src/builtin_macro.rs | 4 ++-- crates/ra_hir_expand/src/db.rs | 2 +- crates/ra_hir_expand/src/eager.rs | 2 +- crates/ra_hir_expand/src/hygiene.rs | 2 +- crates/ra_hir_expand/src/lib.rs | 2 +- crates/ra_hir_expand/src/name.rs | 2 +- crates/ra_hir_expand/src/proc_macro.rs | 2 +- crates/ra_hir_expand/src/test_db.rs | 6 +++--- 9 files changed, 12 insertions(+), 12 deletions(-) (limited to 'crates/ra_hir_expand/src') diff --git a/crates/ra_hir_expand/src/builtin_derive.rs b/crates/ra_hir_expand/src/builtin_derive.rs index 2d2f8bcb8..988a60d56 100644 --- a/crates/ra_hir_expand/src/builtin_derive.rs +++ b/crates/ra_hir_expand/src/builtin_derive.rs @@ -253,8 +253,8 @@ fn partial_ord_expand( #[cfg(test)] mod tests { + use base_db::{fixture::WithFixture, CrateId, SourceDatabase}; use name::{known, Name}; - use ra_db::{fixture::WithFixture, CrateId, SourceDatabase}; use crate::{test_db::TestDB, AstId, MacroCallId, MacroCallKind, MacroCallLoc}; diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs index ae4c84382..86918b626 100644 --- a/crates/ra_hir_expand/src/builtin_macro.rs +++ b/crates/ra_hir_expand/src/builtin_macro.rs @@ -4,10 +4,10 @@ use crate::{ MacroDefId, MacroDefKind, TextSize, }; +use base_db::FileId; use either::Either; use mbe::parse_to_token_tree; use parser::FragmentKind; -use ra_db::FileId; use syntax::ast::{self, AstToken, HasStringValue}; macro_rules! register_builtin { @@ -426,7 +426,7 @@ mod tests { name::AsName, test_db::TestDB, AstNode, EagerCallLoc, MacroCallId, MacroCallKind, MacroCallLoc, }; - use ra_db::{fixture::WithFixture, SourceDatabase}; + use base_db::{fixture::WithFixture, SourceDatabase}; use std::sync::Arc; use syntax::ast::NameOwner; diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index c275f6b01..dcc038bcd 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs @@ -2,9 +2,9 @@ use std::sync::Arc; +use base_db::{salsa, SourceDatabase}; use mbe::{ExpandResult, MacroRules}; use parser::FragmentKind; -use ra_db::{salsa, SourceDatabase}; use syntax::{algo::diff, AstNode, GreenNode, Parse, SyntaxKind::*, SyntaxNode}; use crate::{ diff --git a/crates/ra_hir_expand/src/eager.rs b/crates/ra_hir_expand/src/eager.rs index bd3409f97..10c45646f 100644 --- a/crates/ra_hir_expand/src/eager.rs +++ b/crates/ra_hir_expand/src/eager.rs @@ -25,8 +25,8 @@ use crate::{ EagerCallLoc, EagerMacroId, InFile, MacroCallId, MacroCallKind, MacroDefId, MacroDefKind, }; +use base_db::CrateId; use parser::FragmentKind; -use ra_db::CrateId; use std::sync::Arc; use syntax::{algo::SyntaxRewriter, SyntaxNode}; diff --git a/crates/ra_hir_expand/src/hygiene.rs b/crates/ra_hir_expand/src/hygiene.rs index 23b5eac27..845e9cbc1 100644 --- a/crates/ra_hir_expand/src/hygiene.rs +++ b/crates/ra_hir_expand/src/hygiene.rs @@ -2,8 +2,8 @@ //! //! Specifically, `ast` + `Hygiene` allows you to create a `Name`. Note that, at //! this moment, this is horribly incomplete and handles only `$crate`. +use base_db::CrateId; use either::Either; -use ra_db::CrateId; use syntax::ast; use crate::{ diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs index af0cc445f..7425b561a 100644 --- a/crates/ra_hir_expand/src/lib.rs +++ b/crates/ra_hir_expand/src/lib.rs @@ -18,7 +18,7 @@ pub mod eager; use std::hash::Hash; use std::sync::Arc; -use ra_db::{impl_intern_key, salsa, CrateId, FileId}; +use base_db::{impl_intern_key, salsa, CrateId, FileId}; use syntax::{ algo, ast::{self, AstNode}, diff --git a/crates/ra_hir_expand/src/name.rs b/crates/ra_hir_expand/src/name.rs index 4dcaff088..49841c7a1 100644 --- a/crates/ra_hir_expand/src/name.rs +++ b/crates/ra_hir_expand/src/name.rs @@ -115,7 +115,7 @@ impl AsName for ast::FieldKind { } } -impl AsName for ra_db::Dependency { +impl AsName for base_db::Dependency { fn as_name(&self) -> Name { Name::new_text(SmolStr::new(&*self.name)) } diff --git a/crates/ra_hir_expand/src/proc_macro.rs b/crates/ra_hir_expand/src/proc_macro.rs index 2c0ec41d2..80255ea32 100644 --- a/crates/ra_hir_expand/src/proc_macro.rs +++ b/crates/ra_hir_expand/src/proc_macro.rs @@ -1,7 +1,7 @@ //! Proc Macro Expander stub use crate::{db::AstDatabase, LazyMacroId}; -use ra_db::{CrateId, ProcMacroId}; +use base_db::{CrateId, ProcMacroId}; use tt::buffer::{Cursor, TokenBuffer}; #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] diff --git a/crates/ra_hir_expand/src/test_db.rs b/crates/ra_hir_expand/src/test_db.rs index 332fa556f..86a5d867e 100644 --- a/crates/ra_hir_expand/src/test_db.rs +++ b/crates/ra_hir_expand/src/test_db.rs @@ -5,12 +5,12 @@ use std::{ sync::{Arc, Mutex}, }; -use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate}; +use base_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate}; use rustc_hash::FxHashSet; #[salsa::database( - ra_db::SourceDatabaseExtStorage, - ra_db::SourceDatabaseStorage, + base_db::SourceDatabaseExtStorage, + base_db::SourceDatabaseStorage, crate::db::AstDatabaseStorage )] #[derive(Default)] -- cgit v1.2.3