diff options
-rw-r--r-- | crates/ra_hir/src/expr.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/expr/lower.rs | 6 | ||||
-rw-r--r-- | crates/ra_hir/src/expr/validation.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/generics.rs | 6 | ||||
-rw-r--r-- | crates/ra_hir/src/lib.rs | 7 | ||||
-rw-r--r-- | crates/ra_hir/src/path.rs | 1 | ||||
-rw-r--r-- | crates/ra_hir/src/resolve.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/infer/expr.rs | 6 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/infer/path.rs | 6 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/lower.rs | 3 |
12 files changed, 27 insertions, 20 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index d238741ba..31857ad56 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs | |||
@@ -6,13 +6,13 @@ 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 ra_arena::{impl_arena_id, map::ArenaMap, Arena, RawId}; | 10 | use ra_arena::{impl_arena_id, map::ArenaMap, Arena, RawId}; |
10 | use ra_syntax::{ast, AstPtr}; | 11 | use ra_syntax::{ast, AstPtr}; |
11 | use rustc_hash::FxHashMap; | 12 | use rustc_hash::FxHashMap; |
12 | 13 | ||
13 | use crate::{ | 14 | use crate::{ |
14 | db::HirDatabase, | 15 | db::HirDatabase, |
15 | path::GenericArgs, | ||
16 | ty::primitive::{UncertainFloatTy, UncertainIntTy}, | 16 | ty::primitive::{UncertainFloatTy, UncertainIntTy}, |
17 | type_ref::{Mutability, TypeRef}, | 17 | type_ref::{Mutability, TypeRef}, |
18 | DefWithBody, Either, HasSource, Name, Path, Resolver, Source, | 18 | DefWithBody, Either, HasSource, Name, Path, Resolver, Source, |
diff --git a/crates/ra_hir/src/expr/lower.rs b/crates/ra_hir/src/expr/lower.rs index cf8a41b1e..6436c3a24 100644 --- a/crates/ra_hir/src/expr/lower.rs +++ b/crates/ra_hir/src/expr/lower.rs | |||
@@ -1,6 +1,9 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use hir_def::name::{self, AsName, Name}; | 3 | use hir_def::{ |
4 | name::{self, AsName, Name}, | ||
5 | path::GenericArgs, | ||
6 | }; | ||
4 | use ra_arena::Arena; | 7 | use ra_arena::Arena; |
5 | use ra_syntax::{ | 8 | use ra_syntax::{ |
6 | ast::{ | 9 | ast::{ |
@@ -13,7 +16,6 @@ use test_utils::tested_by; | |||
13 | 16 | ||
14 | use crate::{ | 17 | use crate::{ |
15 | db::HirDatabase, | 18 | db::HirDatabase, |
16 | path::GenericArgs, | ||
17 | ty::primitive::{FloatTy, IntTy, UncertainFloatTy, UncertainIntTy}, | 19 | ty::primitive::{FloatTy, IntTy, UncertainFloatTy, UncertainIntTy}, |
18 | type_ref::TypeRef, | 20 | type_ref::TypeRef, |
19 | AstId, DefWithBody, Either, HirFileId, MacroCallLoc, MacroFileKind, Mutability, Path, Resolver, | 21 | AstId, DefWithBody, Either, HirFileId, MacroCallLoc, MacroFileKind, Mutability, Path, Resolver, |
diff --git a/crates/ra_hir/src/expr/validation.rs b/crates/ra_hir/src/expr/validation.rs index 1aa853c3e..c685edda1 100644 --- a/crates/ra_hir/src/expr/validation.rs +++ b/crates/ra_hir/src/expr/validation.rs | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | use std::sync::Arc; | 3 | use std::sync::Arc; |
4 | 4 | ||
5 | use hir_def::path::known; | ||
5 | use ra_syntax::ast; | 6 | use ra_syntax::ast; |
6 | use rustc_hash::FxHashSet; | 7 | use rustc_hash::FxHashSet; |
7 | 8 | ||
@@ -9,7 +10,6 @@ use crate::{ | |||
9 | db::HirDatabase, | 10 | db::HirDatabase, |
10 | diagnostics::{DiagnosticSink, MissingFields, MissingOkInTailExpr}, | 11 | diagnostics::{DiagnosticSink, MissingFields, MissingOkInTailExpr}, |
11 | expr::AstPtr, | 12 | expr::AstPtr, |
12 | path::known, | ||
13 | ty::{ApplicationTy, InferenceResult, Ty, TypeCtor}, | 13 | ty::{ApplicationTy, InferenceResult, Ty, TypeCtor}, |
14 | Adt, Function, Name, Path, | 14 | Adt, Function, Name, Path, |
15 | }; | 15 | }; |
diff --git a/crates/ra_hir/src/generics.rs b/crates/ra_hir/src/generics.rs index 61786a614..45f9713a0 100644 --- a/crates/ra_hir/src/generics.rs +++ b/crates/ra_hir/src/generics.rs | |||
@@ -5,12 +5,14 @@ | |||
5 | 5 | ||
6 | use std::sync::Arc; | 6 | use std::sync::Arc; |
7 | 7 | ||
8 | use hir_def::name::{self, AsName}; | 8 | use hir_def::{ |
9 | name::{self, AsName}, | ||
10 | path::Path, | ||
11 | }; | ||
9 | use ra_syntax::ast::{self, DefaultTypeParamOwner, NameOwner, TypeBoundsOwner, TypeParamsOwner}; | 12 | use ra_syntax::ast::{self, DefaultTypeParamOwner, NameOwner, TypeBoundsOwner, TypeParamsOwner}; |
10 | 13 | ||
11 | use crate::{ | 14 | use crate::{ |
12 | db::{AstDatabase, DefDatabase, HirDatabase}, | 15 | db::{AstDatabase, DefDatabase, HirDatabase}, |
13 | path::Path, | ||
14 | type_ref::{TypeBound, TypeRef}, | 16 | type_ref::{TypeBound, TypeRef}, |
15 | Adt, Const, Container, Enum, EnumVariant, Function, HasSource, ImplBlock, Name, Struct, Trait, | 17 | Adt, Const, Container, Enum, EnumVariant, Function, HasSource, ImplBlock, Name, Struct, Trait, |
16 | TypeAlias, Union, | 18 | TypeAlias, Union, |
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs index 620911459..e723a1f40 100644 --- a/crates/ra_hir/src/lib.rs +++ b/crates/ra_hir/src/lib.rs | |||
@@ -32,7 +32,6 @@ pub mod debug; | |||
32 | pub mod db; | 32 | pub mod db; |
33 | #[macro_use] | 33 | #[macro_use] |
34 | pub mod mock; | 34 | pub mod mock; |
35 | mod path; | ||
36 | pub mod source_binder; | 35 | pub mod source_binder; |
37 | 36 | ||
38 | mod ids; | 37 | mod ids; |
@@ -71,7 +70,6 @@ pub use crate::{ | |||
71 | ids::{HirFileId, MacroCallId, MacroCallLoc, MacroDefId, MacroFile}, | 70 | ids::{HirFileId, MacroCallId, MacroCallLoc, MacroDefId, MacroFile}, |
72 | impl_block::ImplBlock, | 71 | impl_block::ImplBlock, |
73 | nameres::{ImportId, Namespace, PerNs}, | 72 | nameres::{ImportId, Namespace, PerNs}, |
74 | path::{Path, PathKind}, | ||
75 | resolve::ScopeDef, | 73 | resolve::ScopeDef, |
76 | source_binder::{PathResolution, ScopeEntryWithSyntax, SourceAnalyzer}, | 74 | source_binder::{PathResolution, ScopeEntryWithSyntax, SourceAnalyzer}, |
77 | ty::{ | 75 | ty::{ |
@@ -88,4 +86,7 @@ pub use self::code_model::{ | |||
88 | ModuleSource, Static, Struct, StructField, Trait, TypeAlias, Union, | 86 | ModuleSource, Static, Struct, StructField, Trait, TypeAlias, Union, |
89 | }; | 87 | }; |
90 | 88 | ||
91 | pub use hir_def::name::Name; | 89 | pub use hir_def::{ |
90 | name::Name, | ||
91 | path::{Path, PathKind}, | ||
92 | }; | ||
diff --git a/crates/ra_hir/src/path.rs b/crates/ra_hir/src/path.rs deleted file mode 100644 index 7f0ff4bfc..000000000 --- a/crates/ra_hir/src/path.rs +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | pub use hir_def::path::*; | ||
diff --git a/crates/ra_hir/src/resolve.rs b/crates/ra_hir/src/resolve.rs index b9459552b..2a783b61e 100644 --- a/crates/ra_hir/src/resolve.rs +++ b/crates/ra_hir/src/resolve.rs | |||
@@ -3,6 +3,7 @@ use std::sync::Arc; | |||
3 | 3 | ||
4 | use hir_def::{ | 4 | use hir_def::{ |
5 | name::{self, Name}, | 5 | name::{self, Name}, |
6 | path::{Path, PathKind}, | ||
6 | CrateModuleId, | 7 | CrateModuleId, |
7 | }; | 8 | }; |
8 | use rustc_hash::FxHashSet; | 9 | use rustc_hash::FxHashSet; |
@@ -17,7 +18,6 @@ use crate::{ | |||
17 | generics::GenericParams, | 18 | generics::GenericParams, |
18 | impl_block::ImplBlock, | 19 | impl_block::ImplBlock, |
19 | nameres::{CrateDefMap, PerNs}, | 20 | nameres::{CrateDefMap, PerNs}, |
20 | path::{Path, PathKind}, | ||
21 | Adt, BuiltinType, Const, Enum, EnumVariant, Function, MacroDef, ModuleDef, Static, Struct, | 21 | Adt, BuiltinType, Const, Enum, EnumVariant, Function, MacroDef, ModuleDef, Static, Struct, |
22 | Trait, TypeAlias, | 22 | Trait, TypeAlias, |
23 | }; | 23 | }; |
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 8a1fa29a4..544433a0a 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -7,7 +7,7 @@ | |||
7 | //! purely for "IDE needs". | 7 | //! purely for "IDE needs". |
8 | use std::sync::Arc; | 8 | use std::sync::Arc; |
9 | 9 | ||
10 | use hir_def::name::AsName; | 10 | use hir_def::{name::AsName, path::known}; |
11 | use ra_db::FileId; | 11 | use ra_db::FileId; |
12 | use ra_syntax::{ | 12 | use ra_syntax::{ |
13 | ast::{self, AstNode}, | 13 | ast::{self, AstNode}, |
@@ -25,7 +25,6 @@ use crate::{ | |||
25 | BodySourceMap, | 25 | BodySourceMap, |
26 | }, | 26 | }, |
27 | ids::LocationCtx, | 27 | ids::LocationCtx, |
28 | path::known, | ||
29 | resolve::{ScopeDef, TypeNs, ValueNs}, | 28 | resolve::{ScopeDef, TypeNs, ValueNs}, |
30 | ty::method_resolution::implements_trait, | 29 | ty::method_resolution::implements_trait, |
31 | Const, DefWithBody, Either, Enum, FromSource, Function, HasBody, HirFileId, MacroDef, Module, | 30 | Const, DefWithBody, Either, Enum, FromSource, Function, HasBody, HirFileId, MacroDef, Module, |
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 92b8e718e..05c6b5aad 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -21,7 +21,7 @@ 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; | 24 | use hir_def::{name, path::known}; |
25 | use ra_arena::map::ArenaMap; | 25 | use ra_arena::map::ArenaMap; |
26 | use ra_prof::profile; | 26 | use ra_prof::profile; |
27 | use test_utils::tested_by; | 27 | use test_utils::tested_by; |
@@ -38,7 +38,6 @@ use crate::{ | |||
38 | db::HirDatabase, | 38 | db::HirDatabase, |
39 | diagnostics::DiagnosticSink, | 39 | diagnostics::DiagnosticSink, |
40 | expr::{BindingAnnotation, Body, ExprId, PatId}, | 40 | expr::{BindingAnnotation, Body, ExprId, PatId}, |
41 | path::known, | ||
42 | resolve::{Resolver, TypeNs}, | 41 | resolve::{Resolver, TypeNs}, |
43 | ty::infer::diagnostics::InferenceDiagnostic, | 42 | ty::infer::diagnostics::InferenceDiagnostic, |
44 | type_ref::{Mutability, TypeRef}, | 43 | type_ref::{Mutability, TypeRef}, |
diff --git a/crates/ra_hir/src/ty/infer/expr.rs b/crates/ra_hir/src/ty/infer/expr.rs index 7ef87bfe2..bc6437b44 100644 --- a/crates/ra_hir/src/ty/infer/expr.rs +++ b/crates/ra_hir/src/ty/infer/expr.rs | |||
@@ -3,7 +3,10 @@ | |||
3 | use std::iter::{repeat, repeat_with}; | 3 | use std::iter::{repeat, repeat_with}; |
4 | use std::sync::Arc; | 4 | use std::sync::Arc; |
5 | 5 | ||
6 | use hir_def::name; | 6 | use hir_def::{ |
7 | name, | ||
8 | path::{GenericArg, GenericArgs}, | ||
9 | }; | ||
7 | 10 | ||
8 | use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch}; | 11 | use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch}; |
9 | use crate::{ | 12 | use crate::{ |
@@ -11,7 +14,6 @@ use crate::{ | |||
11 | expr::{self, Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp}, | 14 | expr::{self, Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp}, |
12 | generics::{GenericParams, HasGenericParams}, | 15 | generics::{GenericParams, HasGenericParams}, |
13 | nameres::Namespace, | 16 | nameres::Namespace, |
14 | path::{GenericArg, GenericArgs}, | ||
15 | ty::{ | 17 | ty::{ |
16 | autoderef, method_resolution, op, primitive, CallableDef, InferTy, Mutability, Obligation, | 18 | autoderef, method_resolution, op, primitive, CallableDef, InferTy, Mutability, Obligation, |
17 | ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, TypeWalk, | 19 | ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, TypeWalk, |
diff --git a/crates/ra_hir/src/ty/infer/path.rs b/crates/ra_hir/src/ty/infer/path.rs index db979353a..77aa35ce1 100644 --- a/crates/ra_hir/src/ty/infer/path.rs +++ b/crates/ra_hir/src/ty/infer/path.rs | |||
@@ -1,5 +1,7 @@ | |||
1 | //! Path expression resolution. | 1 | //! Path expression resolution. |
2 | 2 | ||
3 | use hir_def::path::PathSegment; | ||
4 | |||
3 | use super::{ExprOrPatId, InferenceContext, TraitRef}; | 5 | use super::{ExprOrPatId, InferenceContext, TraitRef}; |
4 | use crate::{ | 6 | use crate::{ |
5 | db::HirDatabase, | 7 | db::HirDatabase, |
@@ -131,7 +133,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
131 | fn resolve_trait_assoc_item( | 133 | fn resolve_trait_assoc_item( |
132 | &mut self, | 134 | &mut self, |
133 | trait_ref: TraitRef, | 135 | trait_ref: TraitRef, |
134 | segment: &crate::path::PathSegment, | 136 | segment: &PathSegment, |
135 | id: ExprOrPatId, | 137 | id: ExprOrPatId, |
136 | ) -> Option<(ValueNs, Option<Substs>)> { | 138 | ) -> Option<(ValueNs, Option<Substs>)> { |
137 | let trait_ = trait_ref.trait_; | 139 | let trait_ = trait_ref.trait_; |
@@ -170,7 +172,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
170 | fn resolve_ty_assoc_item( | 172 | fn resolve_ty_assoc_item( |
171 | &mut self, | 173 | &mut self, |
172 | ty: Ty, | 174 | ty: Ty, |
173 | segment: &crate::path::PathSegment, | 175 | segment: &PathSegment, |
174 | id: ExprOrPatId, | 176 | id: ExprOrPatId, |
175 | ) -> Option<(ValueNs, Option<Substs>)> { | 177 | ) -> Option<(ValueNs, Option<Substs>)> { |
176 | if let Ty::Unknown = ty { | 178 | if let Ty::Unknown = ty { |
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs index 366556134..b131b306c 100644 --- a/crates/ra_hir/src/ty/lower.rs +++ b/crates/ra_hir/src/ty/lower.rs | |||
@@ -8,6 +8,8 @@ | |||
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}; | ||
12 | |||
11 | use super::{ | 13 | use super::{ |
12 | FnSig, GenericPredicate, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, | 14 | FnSig, GenericPredicate, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, |
13 | TypeWalk, | 15 | TypeWalk, |
@@ -18,7 +20,6 @@ use crate::{ | |||
18 | generics::HasGenericParams, | 20 | generics::HasGenericParams, |
19 | generics::{GenericDef, WherePredicate}, | 21 | generics::{GenericDef, WherePredicate}, |
20 | nameres::Namespace, | 22 | nameres::Namespace, |
21 | path::{GenericArg, PathSegment}, | ||
22 | resolve::{Resolver, TypeNs}, | 23 | resolve::{Resolver, TypeNs}, |
23 | ty::Adt, | 24 | ty::Adt, |
24 | type_ref::{TypeBound, TypeRef}, | 25 | type_ref::{TypeBound, TypeRef}, |