diff options
author | Florian Diebold <[email protected]> | 2019-10-31 18:28:33 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-11-01 18:57:08 +0000 |
commit | 1173c3dab5f77a1afd367d547790dd82c558fe0d (patch) | |
tree | 50d39c98ad4ac7deae11800d20c0a5dbeb9ed8bc /crates/ra_hir/src/source_binder.rs | |
parent | c7cedea270c492e9a2c8b81c1312fda44fd8217e (diff) |
Refactor to unify with method resolution
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 0008cb232..0398806fd 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -28,8 +28,8 @@ use crate::{ | |||
28 | ids::LocationCtx, | 28 | ids::LocationCtx, |
29 | resolve::{ScopeDef, TypeNs, ValueNs}, | 29 | resolve::{ScopeDef, TypeNs, ValueNs}, |
30 | ty::method_resolution::implements_trait, | 30 | ty::method_resolution::implements_trait, |
31 | Const, DefWithBody, Either, Enum, FromSource, Function, HasBody, HirFileId, MacroDef, Module, | 31 | AssocItem, Const, DefWithBody, Either, Enum, FromSource, Function, HasBody, HirFileId, |
32 | Name, Path, Resolver, Static, Struct, Ty, | 32 | MacroDef, Module, Name, Path, Resolver, Static, Struct, Ty, |
33 | }; | 33 | }; |
34 | 34 | ||
35 | fn try_get_resolver_for_node( | 35 | fn try_get_resolver_for_node( |
@@ -327,7 +327,7 @@ impl SourceAnalyzer { | |||
327 | db: &impl HirDatabase, | 327 | db: &impl HirDatabase, |
328 | ty: Ty, | 328 | ty: Ty, |
329 | name: Option<&Name>, | 329 | name: Option<&Name>, |
330 | callback: impl FnMut(&Ty, Function) -> Option<T>, | 330 | callback: impl FnMut(&Ty, AssocItem) -> Option<T>, |
331 | ) -> Option<T> { | 331 | ) -> Option<T> { |
332 | // There should be no inference vars in types passed here | 332 | // There should be no inference vars in types passed here |
333 | // FIXME check that? | 333 | // FIXME check that? |
@@ -337,6 +337,7 @@ impl SourceAnalyzer { | |||
337 | db, | 337 | db, |
338 | &self.resolver, | 338 | &self.resolver, |
339 | name, | 339 | name, |
340 | crate::ty::method_resolution::LookupMode::MethodCall, | ||
340 | callback, | 341 | callback, |
341 | ) | 342 | ) |
342 | } | 343 | } |