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/src/code_model.rs | 2 +- crates/ra_hir/src/from_id.rs | 2 +- crates/ra_hir/src/semantics.rs | 2 +- crates/ra_hir/src/semantics/source_to_def.rs | 2 +- crates/ra_hir/src/source_analyzer.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 98724c146..d4d6b1759 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -2,6 +2,7 @@ use std::{iter, sync::Arc}; use arrayvec::ArrayVec; +use base_db::{CrateId, Edition, FileId}; use either::Either; use hir_def::{ adt::ReprKind, @@ -30,7 +31,6 @@ use hir_ty::{ method_resolution, ApplicationTy, CallableDefId, Canonical, FnSig, GenericPredicate, InEnvironment, Substs, TraitEnvironment, Ty, TyDefId, TypeCtor, }; -use ra_db::{CrateId, Edition, FileId}; use rustc_hash::FxHashSet; use stdx::impl_from; use syntax::{ diff --git a/crates/ra_hir/src/from_id.rs b/crates/ra_hir/src/from_id.rs index 679ae8121..a53ac1e08 100644 --- a/crates/ra_hir/src/from_id.rs +++ b/crates/ra_hir/src/from_id.rs @@ -29,7 +29,7 @@ macro_rules! from_id { } from_id![ - (ra_db::CrateId, crate::Crate), + (base_db::CrateId, crate::Crate), (hir_def::ModuleId, crate::Module), (hir_def::StructId, crate::Struct), (hir_def::UnionId, crate::Union), diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 2e0ef4408..1467d825d 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs @@ -4,6 +4,7 @@ mod source_to_def; use std::{cell::RefCell, fmt, iter::successors}; +use base_db::{FileId, FileRange}; use hir_def::{ resolver::{self, HasResolver, Resolver}, AsMacroCall, FunctionId, TraitId, VariantId, @@ -11,7 +12,6 @@ use hir_def::{ use hir_expand::{hygiene::Hygiene, name::AsName, ExpansionInfo}; use hir_ty::associated_type_shorthand_candidates; use itertools::Itertools; -use ra_db::{FileId, FileRange}; use rustc_hash::{FxHashMap, FxHashSet}; use syntax::{ algo::{find_node_at_offset, skip_trivia_token}, diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs index ab2fd0957..5918b9541 100644 --- a/crates/ra_hir/src/semantics/source_to_def.rs +++ b/crates/ra_hir/src/semantics/source_to_def.rs @@ -1,5 +1,6 @@ //! Maps *syntax* of various definitions to their semantic ids. +use base_db::FileId; use hir_def::{ child_by_source::ChildBySource, dyn_map::DynMap, @@ -9,7 +10,6 @@ use hir_def::{ ModuleId, StaticId, StructId, TraitId, TypeAliasId, TypeParamId, UnionId, VariantId, }; use hir_expand::{name::AsName, AstId, MacroDefKind}; -use ra_db::FileId; use rustc_hash::FxHashMap; use stdx::impl_from; use syntax::{ diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs index 6b2de3a06..8750584f9 100644 --- a/crates/ra_hir/src/source_analyzer.rs +++ b/crates/ra_hir/src/source_analyzer.rs @@ -31,7 +31,7 @@ use crate::{ MacroDef, ModPath, ModuleDef, Path, PathKind, Static, Struct, Trait, Type, TypeAlias, TypeParam, }; -use ra_db::CrateId; +use base_db::CrateId; /// `SourceAnalyzer` is a convenience wrapper which exposes HIR API in terms of /// original source files. It should not be used inside the HIR itself. -- 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/src/code_model.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index d4d6b1759..8ffb9e99b 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -815,7 +815,7 @@ pub struct MacroDef { impl MacroDef { /// FIXME: right now, this just returns the root module of the crate that /// defines this macro. The reasons for this is that macros are expanded - /// early, in `ra_hir_expand`, where modules simply do not exist yet. + /// early, in `hir_expand`, where modules simply do not exist yet. pub fn module(self, db: &dyn HirDatabase) -> Option { let krate = self.id.krate?; let module_id = db.crate_def_map(krate).root; -- cgit v1.2.3