diff options
author | Aleksey Kladov <[email protected]> | 2019-11-21 10:28:04 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-21 10:28:04 +0000 |
commit | 24964ca58e057b3f32d5cbb17d84e46f2a236ff6 (patch) | |
tree | b8b3f17fba8a26bb96a23e15f84730b0eaf658a7 /crates/ra_hir/src/ty | |
parent | 0102fb41337ac0442e689d410bb424d215e9a7bd (diff) |
Move expr resolver to resolve
Diffstat (limited to 'crates/ra_hir/src/ty')
-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 5e68a1678..414b06ba1 100644 --- a/crates/ra_hir/src/ty/infer/expr.rs +++ b/crates/ra_hir/src/ty/infer/expr.rs | |||
@@ -12,8 +12,9 @@ use hir_expand::name; | |||
12 | use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch}; | 12 | use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch}; |
13 | use crate::{ | 13 | use crate::{ |
14 | db::HirDatabase, | 14 | db::HirDatabase, |
15 | expr::{self, 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, | ||
17 | ty::{ | 18 | ty::{ |
18 | autoderef, method_resolution, op, CallableDef, InferTy, IntTy, Mutability, Namespace, | 19 | autoderef, method_resolution, op, CallableDef, InferTy, IntTy, Mutability, Namespace, |
19 | Obligation, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, TypeWalk, | 20 | Obligation, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, TypeWalk, |
@@ -186,7 +187,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
186 | } | 187 | } |
187 | Expr::Path(p) => { | 188 | Expr::Path(p) => { |
188 | // FIXME this could be more efficient... | 189 | // FIXME this could be more efficient... |
189 | let resolver = expr::resolver_for_expr(self.db, self.owner, tgt_expr); | 190 | let resolver = resolver_for_expr(self.db, self.owner, tgt_expr); |
190 | self.infer_path(&resolver, p, tgt_expr.into()).unwrap_or(Ty::Unknown) | 191 | self.infer_path(&resolver, p, tgt_expr.into()).unwrap_or(Ty::Unknown) |
191 | } | 192 | } |
192 | Expr::Continue => Ty::simple(TypeCtor::Never), | 193 | Expr::Continue => Ty::simple(TypeCtor::Never), |