aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/infer/expr.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-26 18:04:24 +0000
committerAleksey Kladov <[email protected]>2019-11-26 18:04:24 +0000
commit4e415a269e2d821f31963c05843517c6fde0132d (patch)
tree9acc9b8f635405f8c194cfd807927c45ee3fbb02 /crates/ra_hir/src/ty/infer/expr.rs
parent475367d08a0b5e8ed4d6c7c7d43947fd11b26bb7 (diff)
Remove ns-polymorphic type_for_def
Diffstat (limited to 'crates/ra_hir/src/ty/infer/expr.rs')
-rw-r--r--crates/ra_hir/src/ty/infer/expr.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/crates/ra_hir/src/ty/infer/expr.rs b/crates/ra_hir/src/ty/infer/expr.rs
index 3d0895dc6..eb221d6bc 100644
--- a/crates/ra_hir/src/ty/infer/expr.rs
+++ b/crates/ra_hir/src/ty/infer/expr.rs
@@ -17,8 +17,8 @@ use crate::{
17 expr::{Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp}, 17 expr::{Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp},
18 ty::{ 18 ty::{
19 autoderef, method_resolution, op, traits::InEnvironment, CallableDef, InferTy, IntTy, 19 autoderef, method_resolution, op, traits::InEnvironment, CallableDef, InferTy, IntTy,
20 Mutability, Namespace, Obligation, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, 20 Mutability, Obligation, ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor,
21 TypeCtor, TypeWalk, Uncertain, 21 TypeWalk, Uncertain,
22 }, 22 },
23 Name, 23 Name,
24}; 24};
@@ -558,11 +558,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
558 Some((ty, func)) => { 558 Some((ty, func)) => {
559 let ty = canonicalized_receiver.decanonicalize_ty(ty); 559 let ty = canonicalized_receiver.decanonicalize_ty(ty);
560 self.write_method_resolution(tgt_expr, func); 560 self.write_method_resolution(tgt_expr, func);
561 ( 561 (ty, self.db.value_ty(func.id.into()), Some(self.db.generic_params(func.id.into())))
562 ty,
563 self.db.type_for_def(func.into(), Namespace::Values),
564 Some(self.db.generic_params(func.id.into())),
565 )
566 } 562 }
567 None => (receiver_ty, Ty::Unknown, None), 563 None => (receiver_ty, Ty::Unknown, None),
568 }; 564 };