diff options
author | Aleksey Kladov <[email protected]> | 2019-07-04 21:05:17 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-04 21:09:09 +0100 |
commit | 1834bae5b86c54ed9dece26e82436919d59e6cb7 (patch) | |
tree | 92c8b984e874b67fa1831613464bbe356c1af3dd /crates/ra_hir/src/ty/infer.rs | |
parent | 2b2cd829b0f95aef338227deb05ec7503dae9b6c (diff) |
allow rustfmt to reorder imports
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
Diffstat (limited to 'crates/ra_hir/src/ty/infer.rs')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 2c05ca734..a2dc92370 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -15,38 +15,37 @@ | |||
15 | 15 | ||
16 | use std::borrow::Cow; | 16 | use std::borrow::Cow; |
17 | use std::iter::repeat; | 17 | use std::iter::repeat; |
18 | use std::mem; | ||
18 | use std::ops::Index; | 19 | use std::ops::Index; |
19 | use std::sync::Arc; | 20 | use std::sync::Arc; |
20 | use std::mem; | ||
21 | 21 | ||
22 | use ena::unify::{InPlaceUnificationTable, UnifyKey, UnifyValue, NoError}; | 22 | use ena::unify::{InPlaceUnificationTable, NoError, UnifyKey, UnifyValue}; |
23 | use rustc_hash::FxHashMap; | 23 | use rustc_hash::FxHashMap; |
24 | 24 | ||
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; |
28 | 28 | ||
29 | use super::{ | ||
30 | autoderef, method_resolution, op, primitive, | ||
31 | traits::{Guidance, Obligation, Solution}, | ||
32 | ApplicationTy, CallableDef, Substs, TraitRef, Ty, TypableDef, TypeCtor, | ||
33 | }; | ||
29 | use crate::{ | 34 | use crate::{ |
30 | Function, StructField, Path, Name, FnData, AdtDef, ConstData, HirDatabase, | 35 | adt::VariantDef, |
31 | DefWithBody, ImplItem, | 36 | diagnostics::DiagnosticSink, |
32 | type_ref::{TypeRef, Mutability}, | ||
33 | expr::{ | 37 | expr::{ |
34 | Body, Expr, BindingAnnotation, Literal, ExprId, Pat, PatId, UnaryOp, BinaryOp, Statement, | 38 | self, Array, BinaryOp, BindingAnnotation, Body, Expr, ExprId, FieldPat, Literal, Pat, |
35 | FieldPat, Array, self, | 39 | PatId, Statement, UnaryOp, |
36 | }, | 40 | }, |
37 | generics::{GenericParams, HasGenericParams}, | 41 | generics::{GenericParams, HasGenericParams}, |
38 | path::{GenericArgs, GenericArg}, | ||
39 | ModuleDef, | ||
40 | adt::VariantDef, | ||
41 | resolve::{Resolver, Resolution}, | ||
42 | nameres::Namespace, | 42 | nameres::Namespace, |
43 | path::{GenericArg, GenericArgs}, | ||
44 | resolve::{Resolution, Resolver}, | ||
43 | ty::infer::diagnostics::InferenceDiagnostic, | 45 | ty::infer::diagnostics::InferenceDiagnostic, |
44 | diagnostics::DiagnosticSink, | 46 | type_ref::{Mutability, TypeRef}, |
45 | }; | 47 | AdtDef, ConstData, DefWithBody, FnData, Function, HirDatabase, ImplItem, ModuleDef, Name, Path, |
46 | use super::{ | 48 | StructField, |
47 | Ty, TypableDef, Substs, primitive, op, ApplicationTy, TypeCtor, CallableDef, TraitRef, | ||
48 | traits::{Solution, Obligation, Guidance}, | ||
49 | method_resolution, autoderef, | ||
50 | }; | 49 | }; |
51 | 50 | ||
52 | mod unify; | 51 | mod unify; |
@@ -1415,10 +1414,10 @@ impl Expectation { | |||
1415 | 1414 | ||
1416 | mod diagnostics { | 1415 | mod diagnostics { |
1417 | use crate::{ | 1416 | use crate::{ |
1418 | expr::ExprId, | ||
1419 | diagnostics::{DiagnosticSink, NoSuchField}, | 1417 | diagnostics::{DiagnosticSink, NoSuchField}, |
1420 | HirDatabase, Function, HasSource, | 1418 | expr::ExprId, |
1421 | }; | 1419 | Function, HasSource, HirDatabase, |
1420 | }; | ||
1422 | 1421 | ||
1423 | #[derive(Debug, PartialEq, Eq, Clone)] | 1422 | #[derive(Debug, PartialEq, Eq, Clone)] |
1424 | pub(super) enum InferenceDiagnostic { | 1423 | pub(super) enum InferenceDiagnostic { |