aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r--crates/ra_hir_ty/Cargo.toml6
-rw-r--r--crates/ra_hir_ty/src/autoderef.rs2
-rw-r--r--crates/ra_hir_ty/src/db.rs2
-rw-r--r--crates/ra_hir_ty/src/diagnostics.rs2
-rw-r--r--crates/ra_hir_ty/src/lib.rs2
-rw-r--r--crates/ra_hir_ty/src/lower.rs2
-rw-r--r--crates/ra_hir_ty/src/method_resolution.rs2
-rw-r--r--crates/ra_hir_ty/src/test_db.rs6
-rw-r--r--crates/ra_hir_ty/src/tests.rs2
-rw-r--r--crates/ra_hir_ty/src/tests/simple.rs4
-rw-r--r--crates/ra_hir_ty/src/traits.rs2
-rw-r--r--crates/ra_hir_ty/src/traits/chalk.rs2
-rw-r--r--crates/ra_hir_ty/src/traits/chalk/interner.rs2
-rw-r--r--crates/ra_hir_ty/src/traits/chalk/mapping.rs2
14 files changed, 19 insertions, 19 deletions
diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml
index 6156e4a85..d430b08ca 100644
--- a/crates/ra_hir_ty/Cargo.toml
+++ b/crates/ra_hir_ty/Cargo.toml
@@ -18,10 +18,10 @@ rustc-hash = "1.1.0"
18 18
19stdx = { path = "../stdx" } 19stdx = { path = "../stdx" }
20 20
21hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } 21hir_def = { path = "../hir_def" }
22hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } 22hir_expand = { path = "../hir_expand" }
23arena = { path = "../arena" } 23arena = { path = "../arena" }
24ra_db = { path = "../ra_db" } 24base_db = { path = "../base_db" }
25profile = { path = "../profile" } 25profile = { path = "../profile" }
26syntax = { path = "../syntax" } 26syntax = { path = "../syntax" }
27test_utils = { path = "../test_utils" } 27test_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 @@
5 5
6use std::iter::successors; 6use std::iter::successors;
7 7
8use base_db::CrateId;
8use hir_def::lang_item::LangItemTarget; 9use hir_def::lang_item::LangItemTarget;
9use hir_expand::name::name; 10use hir_expand::name::name;
10use log::{info, warn}; 11use log::{info, warn};
11use ra_db::CrateId;
12 12
13use crate::{ 13use crate::{
14 db::HirDatabase, 14 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 @@
3use std::sync::Arc; 3use std::sync::Arc;
4 4
5use arena::map::ArenaMap; 5use arena::map::ArenaMap;
6use base_db::{impl_intern_key, salsa, CrateId, Upcast};
6use hir_def::{ 7use hir_def::{
7 db::DefDatabase, expr::ExprId, DefWithBodyId, FunctionId, GenericDefId, ImplId, LocalFieldId, 8 db::DefDatabase, expr::ExprId, DefWithBodyId, FunctionId, GenericDefId, ImplId, LocalFieldId,
8 TypeParamId, VariantId, 9 TypeParamId, VariantId,
9}; 10};
10use ra_db::{impl_intern_key, salsa, CrateId, Upcast};
11 11
12use crate::{ 12use crate::{
13 method_resolution::{InherentImpls, TraitImpls}, 13 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 {
208 208
209#[cfg(test)] 209#[cfg(test)]
210mod tests { 210mod tests {
211 use base_db::{fixture::WithFixture, FileId, SourceDatabase, SourceDatabaseExt};
211 use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId}; 212 use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId};
212 use hir_expand::{ 213 use hir_expand::{
213 db::AstDatabase, 214 db::AstDatabase,
214 diagnostics::{Diagnostic, DiagnosticSinkBuilder}, 215 diagnostics::{Diagnostic, DiagnosticSinkBuilder},
215 }; 216 };
216 use ra_db::{fixture::WithFixture, FileId, SourceDatabase, SourceDatabaseExt};
217 use rustc_hash::FxHashMap; 217 use rustc_hash::FxHashMap;
218 use syntax::{TextRange, TextSize}; 218 use syntax::{TextRange, TextSize};
219 219
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;
26 26
27use std::{iter, mem, ops::Deref, sync::Arc}; 27use std::{iter, mem, ops::Deref, sync::Arc};
28 28
29use base_db::{salsa, CrateId};
29use hir_def::{ 30use hir_def::{
30 expr::ExprId, 31 expr::ExprId,
31 type_ref::{Mutability, Rawness}, 32 type_ref::{Mutability, Rawness},
@@ -33,7 +34,6 @@ use hir_def::{
33 TypeParamId, 34 TypeParamId,
34}; 35};
35use itertools::Itertools; 36use itertools::Itertools;
36use ra_db::{salsa, CrateId};
37 37
38use crate::{ 38use crate::{
39 db::HirDatabase, 39 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 @@
8use std::{iter, sync::Arc}; 8use std::{iter, sync::Arc};
9 9
10use arena::map::ArenaMap; 10use arena::map::ArenaMap;
11use base_db::CrateId;
11use hir_def::{ 12use hir_def::{
12 adt::StructKind, 13 adt::StructKind,
13 builtin_type::BuiltinType, 14 builtin_type::BuiltinType,
@@ -20,7 +21,6 @@ use hir_def::{
20 UnionId, VariantId, 21 UnionId, VariantId,
21}; 22};
22use hir_expand::name::Name; 23use hir_expand::name::Name;
23use ra_db::CrateId;
24use smallvec::SmallVec; 24use smallvec::SmallVec;
25use stdx::impl_from; 25use stdx::impl_from;
26use test_utils::mark; 26use 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 @@
5use std::{iter, sync::Arc}; 5use std::{iter, sync::Arc};
6 6
7use arrayvec::ArrayVec; 7use arrayvec::ArrayVec;
8use base_db::CrateId;
8use hir_def::{ 9use hir_def::{
9 builtin_type::{IntBitness, Signedness}, 10 builtin_type::{IntBitness, Signedness},
10 lang_item::LangItemTarget, 11 lang_item::LangItemTarget,
@@ -12,7 +13,6 @@ use hir_def::{
12 AssocContainerId, AssocItemId, FunctionId, HasModule, ImplId, Lookup, TraitId, 13 AssocContainerId, AssocItemId, FunctionId, HasModule, ImplId, Lookup, TraitId,
13}; 14};
14use hir_expand::name::Name; 15use hir_expand::name::Name;
15use ra_db::CrateId;
16use rustc_hash::{FxHashMap, FxHashSet}; 16use rustc_hash::{FxHashMap, FxHashSet};
17 17
18use super::Substs; 18use 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::{
5 sync::{Arc, Mutex}, 5 sync::{Arc, Mutex},
6}; 6};
7 7
8use base_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast};
8use hir_def::{db::DefDatabase, ModuleId}; 9use hir_def::{db::DefDatabase, ModuleId};
9use hir_expand::db::AstDatabase; 10use hir_expand::db::AstDatabase;
10use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast};
11use rustc_hash::{FxHashMap, FxHashSet}; 11use rustc_hash::{FxHashMap, FxHashSet};
12use syntax::TextRange; 12use syntax::TextRange;
13use test_utils::extract_annotations; 13use test_utils::extract_annotations;
14 14
15#[salsa::database( 15#[salsa::database(
16 ra_db::SourceDatabaseExtStorage, 16 base_db::SourceDatabaseExtStorage,
17 ra_db::SourceDatabaseStorage, 17 base_db::SourceDatabaseStorage,
18 hir_expand::db::AstDatabaseStorage, 18 hir_expand::db::AstDatabaseStorage,
19 hir_def::db::InternDatabaseStorage, 19 hir_def::db::InternDatabaseStorage,
20 hir_def::db::DefDatabaseStorage, 20 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;
10 10
11use std::sync::Arc; 11use std::sync::Arc;
12 12
13use base_db::{fixture::WithFixture, FileRange, SourceDatabase, SourceDatabaseExt};
13use expect::Expect; 14use expect::Expect;
14use hir_def::{ 15use hir_def::{
15 body::{BodySourceMap, SyntheticSyntax}, 16 body::{BodySourceMap, SyntheticSyntax},
@@ -21,7 +22,6 @@ use hir_def::{
21 AssocItemId, DefWithBodyId, LocalModuleId, Lookup, ModuleDefId, 22 AssocItemId, DefWithBodyId, LocalModuleId, Lookup, ModuleDefId,
22}; 23};
23use hir_expand::{db::AstDatabase, InFile}; 24use hir_expand::{db::AstDatabase, InFile};
24use ra_db::{fixture::WithFixture, FileRange, SourceDatabase, SourceDatabaseExt};
25use stdx::format_to; 25use stdx::format_to;
26use syntax::{ 26use syntax::{
27 algo, 27 algo,
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() {
1776 ); 1776 );
1777} 1777}
1778 1778
1779// This test is actually testing the shadowing behavior within ra_hir_def. It 1779// This test is actually testing the shadowing behavior within hir_def. It
1780// lives here because the testing infrastructure in ra_hir_def isn't currently 1780// lives here because the testing infrastructure in hir_def isn't currently
1781// capable of asserting the necessary conditions. 1781// capable of asserting the necessary conditions.
1782#[test] 1782#[test]
1783fn should_be_shadowing_imports() { 1783fn should_be_shadowing_imports() {
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 @@
1//! Trait solving using Chalk. 1//! Trait solving using Chalk.
2use std::sync::Arc; 2use std::sync::Arc;
3 3
4use base_db::CrateId;
4use chalk_ir::cast::Cast; 5use chalk_ir::cast::Cast;
5use chalk_solve::Solver; 6use chalk_solve::Solver;
6use hir_def::{lang_item::LangItemTarget, TraitId}; 7use hir_def::{lang_item::LangItemTarget, TraitId};
7use ra_db::CrateId;
8 8
9use crate::{db::HirDatabase, DebruijnIndex, Substs}; 9use crate::{db::HirDatabase, DebruijnIndex, Substs};
10 10
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;
6use chalk_ir::{fold::shift::Shift, CanonicalVarKinds, GenericArg, TypeName}; 6use chalk_ir::{fold::shift::Shift, CanonicalVarKinds, GenericArg, TypeName};
7use chalk_solve::rust_ir::{self, OpaqueTyDatumBound, WellKnownTrait}; 7use chalk_solve::rust_ir::{self, OpaqueTyDatumBound, WellKnownTrait};
8 8
9use base_db::{salsa::InternKey, CrateId};
9use hir_def::{ 10use hir_def::{
10 lang_item::{lang_attr, LangItemTarget}, 11 lang_item::{lang_attr, LangItemTarget},
11 AssocContainerId, AssocItemId, HasModule, Lookup, TypeAliasId, 12 AssocContainerId, AssocItemId, HasModule, Lookup, TypeAliasId,
12}; 13};
13use ra_db::{salsa::InternKey, CrateId};
14 14
15use super::ChalkContext; 15use super::ChalkContext;
16use crate::{ 16use 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 @@
2//! representation of the various objects Chalk deals with (types, goals etc.). 2//! representation of the various objects Chalk deals with (types, goals etc.).
3 3
4use super::tls; 4use super::tls;
5use base_db::salsa::InternId;
5use chalk_ir::{GenericArg, Goal, GoalData}; 6use chalk_ir::{GenericArg, Goal, GoalData};
6use hir_def::TypeAliasId; 7use hir_def::TypeAliasId;
7use ra_db::salsa::InternId;
8use std::{fmt, sync::Arc}; 8use std::{fmt, sync::Arc};
9 9
10#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] 10#[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::{
9}; 9};
10use chalk_solve::rust_ir; 10use chalk_solve::rust_ir;
11 11
12use base_db::salsa::InternKey;
12use hir_def::{type_ref::Mutability, AssocContainerId, GenericDefId, Lookup, TypeAliasId}; 13use hir_def::{type_ref::Mutability, AssocContainerId, GenericDefId, Lookup, TypeAliasId};
13use ra_db::salsa::InternKey;
14 14
15use crate::{ 15use crate::{
16 db::HirDatabase, 16 db::HirDatabase,