Skip to content

Commit e91ebfc

Browse files
committed
Cleanup imports
1 parent 3a0929f commit e91ebfc

File tree

5 files changed

+20
-14
lines changed

5 files changed

+20
-14
lines changed

crates/ra_hir/src/ty/infer/coerce.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use hir_def::{
88
lang_item::LangItemTarget,
99
resolver::{HasResolver, Resolver},
10+
type_ref::Mutability,
1011
AdtId,
1112
};
1213
use rustc_hash::FxHashMap;
@@ -15,7 +16,6 @@ use test_utils::tested_by;
1516
use crate::{
1617
db::HirDatabase,
1718
ty::{autoderef, Substs, TraitRef, Ty, TypeCtor, TypeWalk},
18-
Mutability,
1919
};
2020

2121
use super::{InEnvironment, InferTy, InferenceContext, TypeVarValue};

crates/ra_hir/src/ty/infer/expr.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,21 @@ use std::sync::Arc;
55

66
use hir_def::{
77
builtin_type::Signedness,
8+
expr::{Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp},
89
generics::GenericParams,
910
path::{GenericArg, GenericArgs},
1011
resolver::resolver_for_expr,
1112
AdtId, ContainerId, Lookup, StructFieldId,
1213
};
13-
use hir_expand::name;
14+
use hir_expand::name::{self, Name};
1415

1516
use crate::{
1617
db::HirDatabase,
17-
expr::{Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp},
1818
ty::{
1919
autoderef, method_resolution, op, traits::InEnvironment, CallableDef, InferTy, IntTy,
2020
Mutability, Obligation, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor,
2121
TypeWalk, Uncertain,
2222
},
23-
Name,
2423
};
2524

2625
use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch};

crates/ra_hir/src/ty/infer/pat.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
use std::iter::repeat;
44
use std::sync::Arc;
55

6+
use hir_def::{
7+
expr::{BindingAnnotation, Pat, PatId, RecordFieldPat},
8+
path::Path,
9+
type_ref::Mutability,
10+
};
11+
use hir_expand::name::Name;
612
use test_utils::tested_by;
713

814
use super::{BindingMode, InferenceContext};
915
use crate::{
1016
db::HirDatabase,
11-
expr::{BindingAnnotation, Pat, PatId, RecordFieldPat},
12-
ty::{Mutability, Substs, Ty, TypeCtor, TypeWalk},
13-
Name, Path,
17+
ty::{Substs, Ty, TypeCtor, TypeWalk},
1418
};
1519

1620
impl<'a, D: HirDatabase> InferenceContext<'a, D> {

crates/ra_hir/src/ty/infer/path.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
//! Path expression resolution.
22
33
use hir_def::{
4-
path::PathSegment,
4+
path::{Path, PathSegment},
55
resolver::{ResolveValueResult, Resolver, TypeNs, ValueNs},
66
};
7+
use hir_expand::name::Name;
78

89
use crate::{
910
db::HirDatabase,
1011
ty::{method_resolution, Substs, Ty, TypeWalk, ValueTyDefId},
11-
AssocItem, Container, Function, Name, Path,
12+
AssocItem, Container, Function,
1213
};
1314

1415
use super::{ExprOrPatId, InferenceContext, TraitRef};

crates/ra_hir/src/ty/infer/unify.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
//! Unification and canonicalization logic.
22
33
use super::{InferenceContext, Obligation};
4-
use crate::db::HirDatabase;
5-
use crate::ty::{
6-
Canonical, InEnvironment, InferTy, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty,
7-
TypeWalk,
4+
use crate::{
5+
db::HirDatabase,
6+
ty::{
7+
Canonical, InEnvironment, InferTy, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty,
8+
TypeWalk,
9+
},
10+
util::make_mut_slice,
811
};
9-
use crate::util::make_mut_slice;
1012

1113
impl<'a, D: HirDatabase> InferenceContext<'a, D> {
1214
pub(super) fn canonicalizer<'b>(&'b mut self) -> Canonicalizer<'a, 'b, D>

0 commit comments

Comments
 (0)