aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_binder.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-27 09:31:40 +0000
committerAleksey Kladov <[email protected]>2019-11-27 09:34:26 +0000
commit825049bc6247f6d596910cd99f76f891d5435a86 (patch)
tree24e9543a78e13477a85c38f98a58f402d7a40ef9 /crates/ra_hir/src/source_binder.rs
parente91ebfc752bdfa8fc20be6ea97a14aa6a4d897ae (diff)
Decouple
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r--crates/ra_hir/src/source_binder.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 9f3e6c43f..b9d3a1713 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -11,7 +11,7 @@ use hir_def::{
11 expr::{ExprId, PatId}, 11 expr::{ExprId, PatId},
12 path::known, 12 path::known,
13 resolver::{self, resolver_for_scope, HasResolver, Resolver, TypeNs, ValueNs}, 13 resolver::{self, resolver_for_scope, HasResolver, Resolver, TypeNs, ValueNs},
14 DefWithBodyId, 14 AssocItemId, DefWithBodyId,
15}; 15};
16use hir_expand::{ 16use hir_expand::{
17 hygiene::Hygiene, name::AsName, AstId, HirFileId, MacroCallId, MacroFileKind, Source, 17 hygiene::Hygiene, name::AsName, AstId, HirFileId, MacroCallId, MacroFileKind, Source,
@@ -380,7 +380,7 @@ impl SourceAnalyzer {
380 name, 380 name,
381 method_resolution::LookupMode::MethodCall, 381 method_resolution::LookupMode::MethodCall,
382 |ty, it| match it { 382 |ty, it| match it {
383 AssocItem::Function(f) => callback(ty, f), 383 AssocItemId::FunctionId(f) => callback(ty, f.into()),
384 _ => None, 384 _ => None,
385 }, 385 },
386 ) 386 )
@@ -391,7 +391,7 @@ impl SourceAnalyzer {
391 db: &impl HirDatabase, 391 db: &impl HirDatabase,
392 ty: &Type, 392 ty: &Type,
393 name: Option<&Name>, 393 name: Option<&Name>,
394 callback: impl FnMut(&Ty, AssocItem) -> Option<T>, 394 mut callback: impl FnMut(&Ty, AssocItem) -> Option<T>,
395 ) -> Option<T> { 395 ) -> Option<T> {
396 // There should be no inference vars in types passed here 396 // There should be no inference vars in types passed here
397 // FIXME check that? 397 // FIXME check that?
@@ -403,7 +403,7 @@ impl SourceAnalyzer {
403 &self.resolver, 403 &self.resolver,
404 name, 404 name,
405 method_resolution::LookupMode::Path, 405 method_resolution::LookupMode::Path,
406 callback, 406 |ty, it| callback(ty, it.into()),
407 ) 407 )
408 } 408 }
409 409