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.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs
index 132ee0ca2..cff7e7481 100644
--- a/crates/ra_hir/src/ty/infer.rs
+++ b/crates/ra_hir/src/ty/infer.rs
@@ -407,7 +407,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
407 407
408 let substs = 408 let substs =
409 Ty::substs_from_path_segment(self.db, &self.resolver, segment, typable); 409 Ty::substs_from_path_segment(self.db, &self.resolver, segment, typable);
410 self.db.type_for_def(typable, Namespace::Types).apply_substs(substs) 410 self.db.type_for_def(typable, Namespace::Types).subst(&substs)
411 } 411 }
412 Resolution::LocalBinding(_) => { 412 Resolution::LocalBinding(_) => {
413 // can't have a local binding in an associated item path 413 // can't have a local binding in an associated item path
@@ -466,7 +466,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
466 let typable: Option<TypableDef> = def.into(); 466 let typable: Option<TypableDef> = def.into();
467 let typable = typable?; 467 let typable = typable?;
468 let substs = Ty::substs_from_path(self.db, &self.resolver, path, typable); 468 let substs = Ty::substs_from_path(self.db, &self.resolver, path, typable);
469 let ty = self.db.type_for_def(typable, Namespace::Values).apply_substs(substs); 469 let ty = self.db.type_for_def(typable, Namespace::Values).subst(&substs);
470 let ty = self.insert_type_vars(ty); 470 let ty = self.insert_type_vars(ty);
471 Some(ty) 471 Some(ty)
472 } 472 }