aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/infer/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/infer/path.rs')
-rw-r--r--crates/ra_hir/src/ty/infer/path.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/infer/path.rs b/crates/ra_hir/src/ty/infer/path.rs
index 70136e514..6165eba4f 100644
--- a/crates/ra_hir/src/ty/infer/path.rs
+++ b/crates/ra_hir/src/ty/infer/path.rs
@@ -7,7 +7,6 @@ use hir_def::{
7 7
8use crate::{ 8use crate::{
9 db::HirDatabase, 9 db::HirDatabase,
10 generics::HasGenericParams,
11 ty::{method_resolution, Namespace, Substs, Ty, TypableDef, TypeWalk}, 10 ty::{method_resolution, Namespace, Substs, Ty, TypableDef, TypeWalk},
12 AssocItem, Container, Function, Name, Path, 11 AssocItem, Container, Function, Name, Path,
13}; 12};
@@ -204,7 +203,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
204 Container::ImplBlock(_) => self.find_self_types(&def, ty.clone()), 203 Container::ImplBlock(_) => self.find_self_types(&def, ty.clone()),
205 Container::Trait(t) => { 204 Container::Trait(t) => {
206 // we're picking this method 205 // we're picking this method
207 let trait_substs = Substs::build_for_def(self.db, t) 206 let trait_substs = Substs::build_for_def(self.db, t.id)
208 .push(ty.clone()) 207 .push(ty.clone())
209 .fill(std::iter::repeat_with(|| self.new_type_var())) 208 .fill(std::iter::repeat_with(|| self.new_type_var()))
210 .build(); 209 .build();
@@ -230,7 +229,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
230 if let ValueNs::FunctionId(func) = def { 229 if let ValueNs::FunctionId(func) = def {
231 let func = Function::from(*func); 230 let func = Function::from(*func);
232 // We only do the infer if parent has generic params 231 // We only do the infer if parent has generic params
233 let gen = func.generic_params(self.db); 232 let gen = self.db.generic_params(func.id.into());
234 if gen.count_parent_params() == 0 { 233 if gen.count_parent_params() == 0 {
235 return None; 234 return None;
236 } 235 }