aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/Cargo.toml6
-rw-r--r--crates/ra_hir/src/code_model.rs4
-rw-r--r--crates/ra_hir/src/from_id.rs2
-rw-r--r--crates/ra_hir/src/semantics.rs2
-rw-r--r--crates/ra_hir/src/semantics/source_to_def.rs2
-rw-r--r--crates/ra_hir/src/source_analyzer.rs2
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
19stdx = { path = "../stdx" } 19stdx = { path = "../stdx" }
20syntax = { path = "../syntax" } 20syntax = { path = "../syntax" }
21ra_db = { path = "../ra_db" } 21base_db = { path = "../base_db" }
22profile = { path = "../profile" } 22profile = { path = "../profile" }
23hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } 23hir_expand = { path = "../hir_expand" }
24hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } 24hir_def = { path = "../hir_def" }
25hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } 25hir_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 @@
2use std::{iter, sync::Arc}; 2use std::{iter, sync::Arc};
3 3
4use arrayvec::ArrayVec; 4use arrayvec::ArrayVec;
5use base_db::{CrateId, Edition, FileId};
5use either::Either; 6use either::Either;
6use hir_def::{ 7use 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};
33use ra_db::{CrateId, Edition, FileId};
34use rustc_hash::FxHashSet; 34use rustc_hash::FxHashSet;
35use stdx::impl_from; 35use stdx::impl_from;
36use syntax::{ 36use syntax::{
@@ -815,7 +815,7 @@ pub struct MacroDef {
815impl MacroDef { 815impl 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
31from_id![ 31from_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
5use std::{cell::RefCell, fmt, iter::successors}; 5use std::{cell::RefCell, fmt, iter::successors};
6 6
7use base_db::{FileId, FileRange};
7use hir_def::{ 8use 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::{
11use hir_expand::{hygiene::Hygiene, name::AsName, ExpansionInfo}; 12use hir_expand::{hygiene::Hygiene, name::AsName, ExpansionInfo};
12use hir_ty::associated_type_shorthand_candidates; 13use hir_ty::associated_type_shorthand_candidates;
13use itertools::Itertools; 14use itertools::Itertools;
14use ra_db::{FileId, FileRange};
15use rustc_hash::{FxHashMap, FxHashSet}; 15use rustc_hash::{FxHashMap, FxHashSet};
16use syntax::{ 16use 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
3use base_db::FileId;
3use hir_def::{ 4use 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};
11use hir_expand::{name::AsName, AstId, MacroDefKind}; 12use hir_expand::{name::AsName, AstId, MacroDefKind};
12use ra_db::FileId;
13use rustc_hash::FxHashMap; 13use rustc_hash::FxHashMap;
14use stdx::impl_from; 14use stdx::impl_from;
15use syntax::{ 15use 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};
34use ra_db::CrateId; 34use 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.