diff options
author | Aleksey Kladov <[email protected]> | 2019-11-21 12:39:09 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-21 12:39:09 +0000 |
commit | 6d64798a2300858c74b1cc0a22f6d3df578288b3 (patch) | |
tree | cd22f6a6a743bf15dc671995c49904477b249604 /crates/ra_hir/src/ty/infer/expr.rs | |
parent | 00684d708b64fe81a0264795f27594d450a8d08d (diff) |
Move resolver to hir_def
Diffstat (limited to 'crates/ra_hir/src/ty/infer/expr.rs')
-rw-r--r-- | crates/ra_hir/src/ty/infer/expr.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/infer/expr.rs b/crates/ra_hir/src/ty/infer/expr.rs index 1ac2709f5..ac570075f 100644 --- a/crates/ra_hir/src/ty/infer/expr.rs +++ b/crates/ra_hir/src/ty/infer/expr.rs | |||
@@ -6,15 +6,14 @@ use std::sync::Arc; | |||
6 | use hir_def::{ | 6 | use hir_def::{ |
7 | builtin_type::Signedness, | 7 | builtin_type::Signedness, |
8 | path::{GenericArg, GenericArgs}, | 8 | path::{GenericArg, GenericArgs}, |
9 | resolver::resolver_for_expr, | ||
9 | }; | 10 | }; |
10 | use hir_expand::name; | 11 | use hir_expand::name; |
11 | 12 | ||
12 | use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch}; | ||
13 | use crate::{ | 13 | use crate::{ |
14 | db::HirDatabase, | 14 | db::HirDatabase, |
15 | expr::{Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp}, | 15 | expr::{Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp}, |
16 | generics::{GenericParams, HasGenericParams}, | 16 | generics::{GenericParams, HasGenericParams}, |
17 | resolve::resolver_for_expr, | ||
18 | ty::{ | 17 | ty::{ |
19 | autoderef, method_resolution, op, CallableDef, InferTy, IntTy, Mutability, Namespace, | 18 | autoderef, method_resolution, op, CallableDef, InferTy, IntTy, Mutability, Namespace, |
20 | Obligation, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, TypeWalk, | 19 | Obligation, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, TypeWalk, |
@@ -23,6 +22,8 @@ use crate::{ | |||
23 | Adt, Name, | 22 | Adt, Name, |
24 | }; | 23 | }; |
25 | 24 | ||
25 | use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch}; | ||
26 | |||
26 | impl<'a, D: HirDatabase> InferenceContext<'a, D> { | 27 | impl<'a, D: HirDatabase> InferenceContext<'a, D> { |
27 | pub(super) fn infer_expr(&mut self, tgt_expr: ExprId, expected: &Expectation) -> Ty { | 28 | pub(super) fn infer_expr(&mut self, tgt_expr: ExprId, expected: &Expectation) -> Ty { |
28 | let ty = self.infer_expr_inner(tgt_expr, expected); | 29 | let ty = self.infer_expr_inner(tgt_expr, expected); |