diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-13 15:31:49 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-13 15:31:49 +0100 |
commit | e9926948ca267932ccc1341388bfd1b3fa88a001 (patch) | |
tree | cc4b797cb39a40b59e9e3d37178e8a1907f12358 /crates/ra_hir | |
parent | 902f74c2697cc2a50de9067845814a2a852fccfd (diff) | |
parent | 50f8c1ebf23f634b68529603a917e3feeda457fa (diff) |
Merge #5747
5747: Rename crate r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/Cargo.toml | 6 | ||||
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir/src/from_id.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/semantics/source_to_def.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/source_analyzer.rs | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml index ee5622a7d..edca5dc6f 100644 --- a/crates/ra_hir/Cargo.toml +++ b/crates/ra_hir/Cargo.toml | |||
@@ -18,8 +18,8 @@ itertools = "0.9.0" | |||
18 | 18 | ||
19 | stdx = { path = "../stdx" } | 19 | stdx = { path = "../stdx" } |
20 | syntax = { path = "../syntax" } | 20 | syntax = { path = "../syntax" } |
21 | ra_db = { path = "../ra_db" } | 21 | base_db = { path = "../base_db" } |
22 | profile = { path = "../profile" } | 22 | profile = { path = "../profile" } |
23 | hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } | 23 | hir_expand = { path = "../hir_expand" } |
24 | hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } | 24 | hir_def = { path = "../hir_def" } |
25 | hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } | 25 | hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } |
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 98724c146..8ffb9e99b 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -2,6 +2,7 @@ | |||
2 | use std::{iter, sync::Arc}; | 2 | use std::{iter, sync::Arc}; |
3 | 3 | ||
4 | use arrayvec::ArrayVec; | 4 | use arrayvec::ArrayVec; |
5 | use base_db::{CrateId, Edition, FileId}; | ||
5 | use either::Either; | 6 | use either::Either; |
6 | use hir_def::{ | 7 | use hir_def::{ |
7 | adt::ReprKind, | 8 | adt::ReprKind, |
@@ -30,7 +31,6 @@ use hir_ty::{ | |||
30 | method_resolution, ApplicationTy, CallableDefId, Canonical, FnSig, GenericPredicate, | 31 | method_resolution, ApplicationTy, CallableDefId, Canonical, FnSig, GenericPredicate, |
31 | InEnvironment, Substs, TraitEnvironment, Ty, TyDefId, TypeCtor, | 32 | InEnvironment, Substs, TraitEnvironment, Ty, TyDefId, TypeCtor, |
32 | }; | 33 | }; |
33 | use ra_db::{CrateId, Edition, FileId}; | ||
34 | use rustc_hash::FxHashSet; | 34 | use rustc_hash::FxHashSet; |
35 | use stdx::impl_from; | 35 | use stdx::impl_from; |
36 | use syntax::{ | 36 | use syntax::{ |
@@ -815,7 +815,7 @@ pub struct MacroDef { | |||
815 | impl MacroDef { | 815 | impl MacroDef { |
816 | /// FIXME: right now, this just returns the root module of the crate that | 816 | /// FIXME: right now, this just returns the root module of the crate that |
817 | /// defines this macro. The reasons for this is that macros are expanded | 817 | /// defines this macro. The reasons for this is that macros are expanded |
818 | /// early, in `ra_hir_expand`, where modules simply do not exist yet. | 818 | /// early, in `hir_expand`, where modules simply do not exist yet. |
819 | pub fn module(self, db: &dyn HirDatabase) -> Option<Module> { | 819 | pub fn module(self, db: &dyn HirDatabase) -> Option<Module> { |
820 | let krate = self.id.krate?; | 820 | let krate = self.id.krate?; |
821 | let module_id = db.crate_def_map(krate).root; | 821 | let module_id = db.crate_def_map(krate).root; |
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 { | |||
29 | } | 29 | } |
30 | 30 | ||
31 | from_id![ | 31 | from_id![ |
32 | (ra_db::CrateId, crate::Crate), | 32 | (base_db::CrateId, crate::Crate), |
33 | (hir_def::ModuleId, crate::Module), | 33 | (hir_def::ModuleId, crate::Module), |
34 | (hir_def::StructId, crate::Struct), | 34 | (hir_def::StructId, crate::Struct), |
35 | (hir_def::UnionId, crate::Union), | 35 | (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; | |||
4 | 4 | ||
5 | use std::{cell::RefCell, fmt, iter::successors}; | 5 | use std::{cell::RefCell, fmt, iter::successors}; |
6 | 6 | ||
7 | use base_db::{FileId, FileRange}; | ||
7 | use hir_def::{ | 8 | use hir_def::{ |
8 | resolver::{self, HasResolver, Resolver}, | 9 | resolver::{self, HasResolver, Resolver}, |
9 | AsMacroCall, FunctionId, TraitId, VariantId, | 10 | AsMacroCall, FunctionId, TraitId, VariantId, |
@@ -11,7 +12,6 @@ use hir_def::{ | |||
11 | use hir_expand::{hygiene::Hygiene, name::AsName, ExpansionInfo}; | 12 | use hir_expand::{hygiene::Hygiene, name::AsName, ExpansionInfo}; |
12 | use hir_ty::associated_type_shorthand_candidates; | 13 | use hir_ty::associated_type_shorthand_candidates; |
13 | use itertools::Itertools; | 14 | use itertools::Itertools; |
14 | use ra_db::{FileId, FileRange}; | ||
15 | use rustc_hash::{FxHashMap, FxHashSet}; | 15 | use rustc_hash::{FxHashMap, FxHashSet}; |
16 | use syntax::{ | 16 | use syntax::{ |
17 | algo::{find_node_at_offset, skip_trivia_token}, | 17 | 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 @@ | |||
1 | //! Maps *syntax* of various definitions to their semantic ids. | 1 | //! Maps *syntax* of various definitions to their semantic ids. |
2 | 2 | ||
3 | use base_db::FileId; | ||
3 | use hir_def::{ | 4 | use hir_def::{ |
4 | child_by_source::ChildBySource, | 5 | child_by_source::ChildBySource, |
5 | dyn_map::DynMap, | 6 | dyn_map::DynMap, |
@@ -9,7 +10,6 @@ use hir_def::{ | |||
9 | ModuleId, StaticId, StructId, TraitId, TypeAliasId, TypeParamId, UnionId, VariantId, | 10 | ModuleId, StaticId, StructId, TraitId, TypeAliasId, TypeParamId, UnionId, VariantId, |
10 | }; | 11 | }; |
11 | use hir_expand::{name::AsName, AstId, MacroDefKind}; | 12 | use hir_expand::{name::AsName, AstId, MacroDefKind}; |
12 | use ra_db::FileId; | ||
13 | use rustc_hash::FxHashMap; | 13 | use rustc_hash::FxHashMap; |
14 | use stdx::impl_from; | 14 | use stdx::impl_from; |
15 | use syntax::{ | 15 | 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::{ | |||
31 | MacroDef, ModPath, ModuleDef, Path, PathKind, Static, Struct, Trait, Type, TypeAlias, | 31 | MacroDef, ModPath, ModuleDef, Path, PathKind, Static, Struct, Trait, Type, TypeAlias, |
32 | TypeParam, | 32 | TypeParam, |
33 | }; | 33 | }; |
34 | use ra_db::CrateId; | 34 | use base_db::CrateId; |
35 | 35 | ||
36 | /// `SourceAnalyzer` is a convenience wrapper which exposes HIR API in terms of | 36 | /// `SourceAnalyzer` is a convenience wrapper which exposes HIR API in terms of |
37 | /// original source files. It should not be used inside the HIR itself. | 37 | /// original source files. It should not be used inside the HIR itself. |