aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/infer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/infer.rs')
-rw-r--r--crates/ra_hir/src/ty/infer.rs39
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
16use std::borrow::Cow; 16use std::borrow::Cow;
17use std::iter::repeat; 17use std::iter::repeat;
18use std::mem;
18use std::ops::Index; 19use std::ops::Index;
19use std::sync::Arc; 20use std::sync::Arc;
20use std::mem;
21 21
22use ena::unify::{InPlaceUnificationTable, UnifyKey, UnifyValue, NoError}; 22use ena::unify::{InPlaceUnificationTable, NoError, UnifyKey, UnifyValue};
23use rustc_hash::FxHashMap; 23use rustc_hash::FxHashMap;
24 24
25use ra_arena::map::ArenaMap; 25use ra_arena::map::ArenaMap;
26use ra_prof::profile; 26use ra_prof::profile;
27use test_utils::tested_by; 27use test_utils::tested_by;
28 28
29use super::{
30 autoderef, method_resolution, op, primitive,
31 traits::{Guidance, Obligation, Solution},
32 ApplicationTy, CallableDef, Substs, TraitRef, Ty, TypableDef, TypeCtor,
33};
29use crate::{ 34use 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,
46use 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
52mod unify; 51mod unify;
@@ -1415,10 +1414,10 @@ impl Expectation {
1415 1414
1416mod diagnostics { 1415mod 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 {