aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r--crates/ra_hir/src/ty/infer.rs7
-rw-r--r--crates/ra_hir/src/ty/infer/coerce.rs3
-rw-r--r--crates/ra_hir/src/ty/lower.rs6
-rw-r--r--crates/ra_hir/src/ty/method_resolution.rs3
4 files changed, 11 insertions, 8 deletions
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;
21use ena::unify::{InPlaceUnificationTable, NoError, UnifyKey, UnifyValue}; 21use ena::unify::{InPlaceUnificationTable, NoError, UnifyKey, UnifyValue};
22use rustc_hash::FxHashMap; 22use rustc_hash::FxHashMap;
23 23
24use hir_def::{name, path::known}; 24use hir_def::{
25 name,
26 path::known,
27 type_ref::{Mutability, TypeRef},
28};
25use ra_arena::map::ArenaMap; 29use ra_arena::map::ArenaMap;
26use ra_prof::profile; 30use ra_prof::profile;
27use test_utils::tested_by; 31use 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
21impl<'a, D: HirDatabase> InferenceContext<'a, D> { 20impl<'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 @@
8use std::iter; 8use std::iter;
9use std::sync::Arc; 9use std::sync::Arc;
10 10
11use hir_def::path::{GenericArg, PathSegment}; 11use hir_def::{
12 path::{GenericArg, PathSegment},
13 type_ref::{TypeBound, TypeRef},
14};
12 15
13use super::{ 16use 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.