diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-21 13:32:40 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-21 13:32:40 +0000 |
commit | 0630bbabfc19126be5fa47933c5ea03d48030582 (patch) | |
tree | d7e8fc2fc2234c4bd28c2274bdc761f74a78940a /crates/ra_hir/src/ty/infer/path.rs | |
parent | 1f61915bde4c5d8d4fe2e9b8dfa9445008730b79 (diff) | |
parent | 952405cb4180993af0f5c939d5276dbdf2a19152 (diff) |
Merge #2338
2338: Remove old hir::generics module r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/infer/path.rs')
-rw-r--r-- | crates/ra_hir/src/ty/infer/path.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/infer/path.rs b/crates/ra_hir/src/ty/infer/path.rs index 70136e514..ee54d8217 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 | ||
8 | use crate::{ | 8 | use 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 | }; |
@@ -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 | } |