mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Cleanup imports
This commit is contained in:
parent
3a0929fca7
commit
e91ebfc752
5 changed files with 20 additions and 14 deletions
|
@ -7,6 +7,7 @@
|
|||
use hir_def::{
|
||||
lang_item::LangItemTarget,
|
||||
resolver::{HasResolver, Resolver},
|
||||
type_ref::Mutability,
|
||||
AdtId,
|
||||
};
|
||||
use rustc_hash::FxHashMap;
|
||||
|
@ -15,7 +16,6 @@ use test_utils::tested_by;
|
|||
use crate::{
|
||||
db::HirDatabase,
|
||||
ty::{autoderef, Substs, TraitRef, Ty, TypeCtor, TypeWalk},
|
||||
Mutability,
|
||||
};
|
||||
|
||||
use super::{InEnvironment, InferTy, InferenceContext, TypeVarValue};
|
||||
|
|
|
@ -5,22 +5,21 @@ use std::sync::Arc;
|
|||
|
||||
use hir_def::{
|
||||
builtin_type::Signedness,
|
||||
expr::{Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp},
|
||||
generics::GenericParams,
|
||||
path::{GenericArg, GenericArgs},
|
||||
resolver::resolver_for_expr,
|
||||
AdtId, ContainerId, Lookup, StructFieldId,
|
||||
};
|
||||
use hir_expand::name;
|
||||
use hir_expand::name::{self, Name};
|
||||
|
||||
use crate::{
|
||||
db::HirDatabase,
|
||||
expr::{Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp},
|
||||
ty::{
|
||||
autoderef, method_resolution, op, traits::InEnvironment, CallableDef, InferTy, IntTy,
|
||||
Mutability, Obligation, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor,
|
||||
TypeWalk, Uncertain,
|
||||
},
|
||||
Name,
|
||||
};
|
||||
|
||||
use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch};
|
||||
|
|
|
@ -3,14 +3,18 @@
|
|||
use std::iter::repeat;
|
||||
use std::sync::Arc;
|
||||
|
||||
use hir_def::{
|
||||
expr::{BindingAnnotation, Pat, PatId, RecordFieldPat},
|
||||
path::Path,
|
||||
type_ref::Mutability,
|
||||
};
|
||||
use hir_expand::name::Name;
|
||||
use test_utils::tested_by;
|
||||
|
||||
use super::{BindingMode, InferenceContext};
|
||||
use crate::{
|
||||
db::HirDatabase,
|
||||
expr::{BindingAnnotation, Pat, PatId, RecordFieldPat},
|
||||
ty::{Mutability, Substs, Ty, TypeCtor, TypeWalk},
|
||||
Name, Path,
|
||||
ty::{Substs, Ty, TypeCtor, TypeWalk},
|
||||
};
|
||||
|
||||
impl<'a, D: HirDatabase> InferenceContext<'a, D> {
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
//! Path expression resolution.
|
||||
|
||||
use hir_def::{
|
||||
path::PathSegment,
|
||||
path::{Path, PathSegment},
|
||||
resolver::{ResolveValueResult, Resolver, TypeNs, ValueNs},
|
||||
};
|
||||
use hir_expand::name::Name;
|
||||
|
||||
use crate::{
|
||||
db::HirDatabase,
|
||||
ty::{method_resolution, Substs, Ty, TypeWalk, ValueTyDefId},
|
||||
AssocItem, Container, Function, Name, Path,
|
||||
AssocItem, Container, Function,
|
||||
};
|
||||
|
||||
use super::{ExprOrPatId, InferenceContext, TraitRef};
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
//! Unification and canonicalization logic.
|
||||
|
||||
use super::{InferenceContext, Obligation};
|
||||
use crate::db::HirDatabase;
|
||||
use crate::ty::{
|
||||
use crate::{
|
||||
db::HirDatabase,
|
||||
ty::{
|
||||
Canonical, InEnvironment, InferTy, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty,
|
||||
TypeWalk,
|
||||
},
|
||||
util::make_mut_slice,
|
||||
};
|
||||
use crate::util::make_mut_slice;
|
||||
|
||||
impl<'a, D: HirDatabase> InferenceContext<'a, D> {
|
||||
pub(super) fn canonicalizer<'b>(&'b mut self) -> Canonicalizer<'a, 'b, D>
|
||||
|
|
Loading…
Reference in a new issue