diff options
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/adt.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/expr.rs | 6 | ||||
-rw-r--r-- | crates/ra_hir/src/expr/lower.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/generics.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/impl_block.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/lib.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/ty.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 7 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/infer/coerce.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/lower.rs | 6 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/method_resolution.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/type_alias.rs | 6 | ||||
-rw-r--r-- | crates/ra_hir/src/type_ref.rs | 1 |
14 files changed, 27 insertions, 24 deletions
diff --git a/crates/ra_hir/src/adt.rs b/crates/ra_hir/src/adt.rs index ce64980bb..d16b3a1cc 100644 --- a/crates/ra_hir/src/adt.rs +++ b/crates/ra_hir/src/adt.rs | |||
@@ -3,13 +3,12 @@ | |||
3 | 3 | ||
4 | use std::sync::Arc; | 4 | use std::sync::Arc; |
5 | 5 | ||
6 | use hir_def::name::AsName; | 6 | use hir_def::{name::AsName, type_ref::TypeRef}; |
7 | use ra_arena::{impl_arena_id, Arena, RawId}; | 7 | use ra_arena::{impl_arena_id, Arena, RawId}; |
8 | use ra_syntax::ast::{self, NameOwner, StructKind, TypeAscriptionOwner}; | 8 | use ra_syntax::ast::{self, NameOwner, StructKind, TypeAscriptionOwner}; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{ |
11 | db::{AstDatabase, DefDatabase, HirDatabase}, | 11 | db::{AstDatabase, DefDatabase, HirDatabase}, |
12 | type_ref::TypeRef, | ||
13 | Enum, EnumVariant, FieldSource, HasSource, Module, Name, Source, Struct, StructField, | 12 | Enum, EnumVariant, FieldSource, HasSource, Module, Name, Source, Struct, StructField, |
14 | }; | 13 | }; |
15 | 14 | ||
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 7848d0a3f..d865c972e 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -10,6 +10,7 @@ use hir_def::{ | |||
10 | self, AsName, BOOL, CHAR, F32, F64, I128, I16, I32, I64, I8, ISIZE, SELF_TYPE, STR, U128, | 10 | self, AsName, BOOL, CHAR, F32, F64, I128, I16, I32, I64, I8, ISIZE, SELF_TYPE, STR, U128, |
11 | U16, U32, U64, U8, USIZE, | 11 | U16, U32, U64, U8, USIZE, |
12 | }, | 12 | }, |
13 | type_ref::{Mutability, TypeRef}, | ||
13 | CrateModuleId, ModuleId, | 14 | CrateModuleId, ModuleId, |
14 | }; | 15 | }; |
15 | use ra_db::{CrateId, Edition}; | 16 | use ra_db::{CrateId, Edition}; |
@@ -33,8 +34,6 @@ use crate::{ | |||
33 | primitive::{FloatBitness, FloatTy, IntBitness, IntTy, Signedness}, | 34 | primitive::{FloatBitness, FloatTy, IntBitness, IntTy, Signedness}, |
34 | InferenceResult, TraitRef, | 35 | InferenceResult, TraitRef, |
35 | }, | 36 | }, |
36 | type_ref::Mutability, | ||
37 | type_ref::TypeRef, | ||
38 | Either, HasSource, Name, Ty, | 37 | Either, HasSource, Name, Ty, |
39 | }; | 38 | }; |
40 | 39 | ||
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index 31857ad56..6e23197a4 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs | |||
@@ -6,7 +6,10 @@ pub(crate) mod validation; | |||
6 | 6 | ||
7 | use std::{ops::Index, sync::Arc}; | 7 | use std::{ops::Index, sync::Arc}; |
8 | 8 | ||
9 | use hir_def::path::GenericArgs; | 9 | use hir_def::{ |
10 | path::GenericArgs, | ||
11 | type_ref::{Mutability, TypeRef}, | ||
12 | }; | ||
10 | use ra_arena::{impl_arena_id, map::ArenaMap, Arena, RawId}; | 13 | use ra_arena::{impl_arena_id, map::ArenaMap, Arena, RawId}; |
11 | use ra_syntax::{ast, AstPtr}; | 14 | use ra_syntax::{ast, AstPtr}; |
12 | use rustc_hash::FxHashMap; | 15 | use rustc_hash::FxHashMap; |
@@ -14,7 +17,6 @@ use rustc_hash::FxHashMap; | |||
14 | use crate::{ | 17 | use crate::{ |
15 | db::HirDatabase, | 18 | db::HirDatabase, |
16 | ty::primitive::{UncertainFloatTy, UncertainIntTy}, | 19 | ty::primitive::{UncertainFloatTy, UncertainIntTy}, |
17 | type_ref::{Mutability, TypeRef}, | ||
18 | DefWithBody, Either, HasSource, Name, Path, Resolver, Source, | 20 | DefWithBody, Either, HasSource, Name, Path, Resolver, Source, |
19 | }; | 21 | }; |
20 | 22 | ||
diff --git a/crates/ra_hir/src/expr/lower.rs b/crates/ra_hir/src/expr/lower.rs index 6436c3a24..ad029b868 100644 --- a/crates/ra_hir/src/expr/lower.rs +++ b/crates/ra_hir/src/expr/lower.rs | |||
@@ -3,6 +3,7 @@ | |||
3 | use hir_def::{ | 3 | use hir_def::{ |
4 | name::{self, AsName, Name}, | 4 | name::{self, AsName, Name}, |
5 | path::GenericArgs, | 5 | path::GenericArgs, |
6 | type_ref::TypeRef, | ||
6 | }; | 7 | }; |
7 | use ra_arena::Arena; | 8 | use ra_arena::Arena; |
8 | use ra_syntax::{ | 9 | use ra_syntax::{ |
@@ -17,7 +18,6 @@ use test_utils::tested_by; | |||
17 | use crate::{ | 18 | use crate::{ |
18 | db::HirDatabase, | 19 | db::HirDatabase, |
19 | ty::primitive::{FloatTy, IntTy, UncertainFloatTy, UncertainIntTy}, | 20 | ty::primitive::{FloatTy, IntTy, UncertainFloatTy, UncertainIntTy}, |
20 | type_ref::TypeRef, | ||
21 | AstId, DefWithBody, Either, HirFileId, MacroCallLoc, MacroFileKind, Mutability, Path, Resolver, | 21 | AstId, DefWithBody, Either, HirFileId, MacroCallLoc, MacroFileKind, Mutability, Path, Resolver, |
22 | Source, | 22 | Source, |
23 | }; | 23 | }; |
diff --git a/crates/ra_hir/src/generics.rs b/crates/ra_hir/src/generics.rs index 45f9713a0..9d5d18564 100644 --- a/crates/ra_hir/src/generics.rs +++ b/crates/ra_hir/src/generics.rs | |||
@@ -8,12 +8,12 @@ use std::sync::Arc; | |||
8 | use hir_def::{ | 8 | use hir_def::{ |
9 | name::{self, AsName}, | 9 | name::{self, AsName}, |
10 | path::Path, | 10 | path::Path, |
11 | type_ref::{TypeBound, TypeRef}, | ||
11 | }; | 12 | }; |
12 | use ra_syntax::ast::{self, DefaultTypeParamOwner, NameOwner, TypeBoundsOwner, TypeParamsOwner}; | 13 | use ra_syntax::ast::{self, DefaultTypeParamOwner, NameOwner, TypeBoundsOwner, TypeParamsOwner}; |
13 | 14 | ||
14 | use crate::{ | 15 | use crate::{ |
15 | db::{AstDatabase, DefDatabase, HirDatabase}, | 16 | db::{AstDatabase, DefDatabase, HirDatabase}, |
16 | type_ref::{TypeBound, TypeRef}, | ||
17 | Adt, Const, Container, Enum, EnumVariant, Function, HasSource, ImplBlock, Name, Struct, Trait, | 17 | Adt, Const, Container, Enum, EnumVariant, Function, HasSource, ImplBlock, Name, Struct, Trait, |
18 | TypeAlias, Union, | 18 | TypeAlias, Union, |
19 | }; | 19 | }; |
diff --git a/crates/ra_hir/src/impl_block.rs b/crates/ra_hir/src/impl_block.rs index 06f21fc33..8584686fd 100644 --- a/crates/ra_hir/src/impl_block.rs +++ b/crates/ra_hir/src/impl_block.rs | |||
@@ -3,6 +3,7 @@ | |||
3 | use rustc_hash::FxHashMap; | 3 | use rustc_hash::FxHashMap; |
4 | use std::sync::Arc; | 4 | use std::sync::Arc; |
5 | 5 | ||
6 | use hir_def::type_ref::TypeRef; | ||
6 | use ra_arena::{impl_arena_id, map::ArenaMap, Arena, RawId}; | 7 | use ra_arena::{impl_arena_id, map::ArenaMap, Arena, RawId}; |
7 | use ra_cfg::CfgOptions; | 8 | use ra_cfg::CfgOptions; |
8 | use ra_syntax::{ | 9 | use ra_syntax::{ |
@@ -19,7 +20,6 @@ use crate::{ | |||
19 | ids::MacroCallLoc, | 20 | ids::MacroCallLoc, |
20 | resolve::Resolver, | 21 | resolve::Resolver, |
21 | ty::Ty, | 22 | ty::Ty, |
22 | type_ref::TypeRef, | ||
23 | AssocItem, AstId, Const, Function, HasSource, HirFileId, MacroFileKind, Path, Source, TraitRef, | 23 | AssocItem, AstId, Const, Function, HasSource, HirFileId, MacroFileKind, Path, Source, TraitRef, |
24 | TypeAlias, | 24 | TypeAlias, |
25 | }; | 25 | }; |
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs index e723a1f40..4dd99c74f 100644 --- a/crates/ra_hir/src/lib.rs +++ b/crates/ra_hir/src/lib.rs | |||
@@ -39,7 +39,6 @@ mod nameres; | |||
39 | mod adt; | 39 | mod adt; |
40 | mod traits; | 40 | mod traits; |
41 | mod type_alias; | 41 | mod type_alias; |
42 | mod type_ref; | ||
43 | mod ty; | 42 | mod ty; |
44 | mod attr; | 43 | mod attr; |
45 | mod impl_block; | 44 | mod impl_block; |
@@ -75,7 +74,6 @@ pub use crate::{ | |||
75 | ty::{ | 74 | ty::{ |
76 | display::HirDisplay, ApplicationTy, CallableDef, Substs, TraitRef, Ty, TypeCtor, TypeWalk, | 75 | display::HirDisplay, ApplicationTy, CallableDef, Substs, TraitRef, Ty, TypeCtor, TypeWalk, |
77 | }, | 76 | }, |
78 | type_ref::Mutability, | ||
79 | }; | 77 | }; |
80 | 78 | ||
81 | pub use self::code_model::{ | 79 | pub use self::code_model::{ |
@@ -89,4 +87,5 @@ pub use self::code_model::{ | |||
89 | pub use hir_def::{ | 87 | pub use hir_def::{ |
90 | name::Name, | 88 | name::Name, |
91 | path::{Path, PathKind}, | 89 | path::{Path, PathKind}, |
90 | type_ref::Mutability, | ||
92 | }; | 91 | }; |
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index cc9746f6d..d2bfcdc7d 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs | |||
@@ -17,8 +17,8 @@ use std::sync::Arc; | |||
17 | use std::{fmt, iter, mem}; | 17 | use std::{fmt, iter, mem}; |
18 | 18 | ||
19 | use crate::{ | 19 | use crate::{ |
20 | db::HirDatabase, expr::ExprId, type_ref::Mutability, util::make_mut_slice, Adt, Crate, | 20 | db::HirDatabase, expr::ExprId, util::make_mut_slice, Adt, Crate, DefWithBody, GenericParams, |
21 | DefWithBody, GenericParams, HasGenericParams, Name, Trait, TypeAlias, | 21 | HasGenericParams, Mutability, Name, Trait, TypeAlias, |
22 | }; | 22 | }; |
23 | use display::{HirDisplay, HirFormatter}; | 23 | use display::{HirDisplay, HirFormatter}; |
24 | 24 | ||
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 05c6b5aad..7466ee341 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -21,7 +21,11 @@ use std::sync::Arc; | |||
21 | use ena::unify::{InPlaceUnificationTable, NoError, UnifyKey, UnifyValue}; | 21 | use ena::unify::{InPlaceUnificationTable, NoError, UnifyKey, UnifyValue}; |
22 | use rustc_hash::FxHashMap; | 22 | use rustc_hash::FxHashMap; |
23 | 23 | ||
24 | use hir_def::{name, path::known}; | 24 | use hir_def::{ |
25 | name, | ||
26 | path::known, | ||
27 | type_ref::{Mutability, TypeRef}, | ||
28 | }; | ||
25 | use ra_arena::map::ArenaMap; | 29 | use ra_arena::map::ArenaMap; |
26 | use ra_prof::profile; | 30 | use ra_prof::profile; |
27 | use test_utils::tested_by; | 31 | use test_utils::tested_by; |
@@ -40,7 +44,6 @@ use crate::{ | |||
40 | expr::{BindingAnnotation, Body, ExprId, PatId}, | 44 | expr::{BindingAnnotation, Body, ExprId, PatId}, |
41 | resolve::{Resolver, TypeNs}, | 45 | resolve::{Resolver, TypeNs}, |
42 | ty::infer::diagnostics::InferenceDiagnostic, | 46 | ty::infer::diagnostics::InferenceDiagnostic, |
43 | type_ref::{Mutability, TypeRef}, | ||
44 | Adt, AssocItem, ConstData, DefWithBody, FnData, Function, HasBody, Path, StructField, | 47 | Adt, AssocItem, ConstData, DefWithBody, FnData, Function, HasBody, Path, StructField, |
45 | }; | 48 | }; |
46 | 49 | ||
diff --git a/crates/ra_hir/src/ty/infer/coerce.rs b/crates/ra_hir/src/ty/infer/coerce.rs index 0429a9866..6ea135126 100644 --- a/crates/ra_hir/src/ty/infer/coerce.rs +++ b/crates/ra_hir/src/ty/infer/coerce.rs | |||
@@ -14,8 +14,7 @@ use crate::{ | |||
14 | lang_item::LangItemTarget, | 14 | lang_item::LangItemTarget, |
15 | resolve::Resolver, | 15 | resolve::Resolver, |
16 | ty::{autoderef, Substs, Ty, TypeCtor, TypeWalk}, | 16 | ty::{autoderef, Substs, Ty, TypeCtor, TypeWalk}, |
17 | type_ref::Mutability, | 17 | Adt, Mutability, |
18 | Adt, | ||
19 | }; | 18 | }; |
20 | 19 | ||
21 | impl<'a, D: HirDatabase> InferenceContext<'a, D> { | 20 | impl<'a, D: HirDatabase> InferenceContext<'a, D> { |
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs index b131b306c..0f49a0e54 100644 --- a/crates/ra_hir/src/ty/lower.rs +++ b/crates/ra_hir/src/ty/lower.rs | |||
@@ -8,7 +8,10 @@ | |||
8 | use std::iter; | 8 | use std::iter; |
9 | use std::sync::Arc; | 9 | use std::sync::Arc; |
10 | 10 | ||
11 | use hir_def::path::{GenericArg, PathSegment}; | 11 | use hir_def::{ |
12 | path::{GenericArg, PathSegment}, | ||
13 | type_ref::{TypeBound, TypeRef}, | ||
14 | }; | ||
12 | 15 | ||
13 | use super::{ | 16 | use super::{ |
14 | FnSig, GenericPredicate, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, | 17 | FnSig, GenericPredicate, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, |
@@ -22,7 +25,6 @@ use crate::{ | |||
22 | nameres::Namespace, | 25 | nameres::Namespace, |
23 | resolve::{Resolver, TypeNs}, | 26 | resolve::{Resolver, TypeNs}, |
24 | ty::Adt, | 27 | ty::Adt, |
25 | type_ref::{TypeBound, TypeRef}, | ||
26 | util::make_mut_slice, | 28 | util::make_mut_slice, |
27 | BuiltinType, Const, Enum, EnumVariant, Function, ModuleDef, Path, Static, Struct, StructField, | 29 | BuiltinType, Const, Enum, EnumVariant, Function, ModuleDef, Path, Static, Struct, StructField, |
28 | Trait, TypeAlias, Union, | 30 | Trait, TypeAlias, Union, |
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs index 50583a142..eb69344f6 100644 --- a/crates/ra_hir/src/ty/method_resolution.rs +++ b/crates/ra_hir/src/ty/method_resolution.rs | |||
@@ -15,8 +15,7 @@ use crate::{ | |||
15 | resolve::Resolver, | 15 | resolve::Resolver, |
16 | ty::primitive::{FloatBitness, UncertainFloatTy, UncertainIntTy}, | 16 | ty::primitive::{FloatBitness, UncertainFloatTy, UncertainIntTy}, |
17 | ty::{Ty, TypeCtor}, | 17 | ty::{Ty, TypeCtor}, |
18 | type_ref::Mutability, | 18 | AssocItem, Crate, Function, Module, Mutability, Name, Trait, |
19 | AssocItem, Crate, Function, Module, Name, Trait, | ||
20 | }; | 19 | }; |
21 | 20 | ||
22 | /// This is used as a key for indexing impls. | 21 | /// This is used as a key for indexing impls. |
diff --git a/crates/ra_hir/src/type_alias.rs b/crates/ra_hir/src/type_alias.rs index 18c01e1b9..87126ee7f 100644 --- a/crates/ra_hir/src/type_alias.rs +++ b/crates/ra_hir/src/type_alias.rs | |||
@@ -2,12 +2,14 @@ | |||
2 | 2 | ||
3 | use std::sync::Arc; | 3 | use std::sync::Arc; |
4 | 4 | ||
5 | use hir_def::name::{AsName, Name}; | 5 | use hir_def::{ |
6 | name::{AsName, Name}, | ||
7 | type_ref::TypeRef, | ||
8 | }; | ||
6 | use ra_syntax::ast::NameOwner; | 9 | use ra_syntax::ast::NameOwner; |
7 | 10 | ||
8 | use crate::{ | 11 | use crate::{ |
9 | db::{AstDatabase, DefDatabase}, | 12 | db::{AstDatabase, DefDatabase}, |
10 | type_ref::TypeRef, | ||
11 | HasSource, TypeAlias, | 13 | HasSource, TypeAlias, |
12 | }; | 14 | }; |
13 | 15 | ||
diff --git a/crates/ra_hir/src/type_ref.rs b/crates/ra_hir/src/type_ref.rs deleted file mode 100644 index bd56ddbe6..000000000 --- a/crates/ra_hir/src/type_ref.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | pub use hir_def::type_ref::*; | ||