From 825049bc6247f6d596910cd99f76f891d5435a86 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 27 Nov 2019 12:31:40 +0300 Subject: Decouple --- crates/ra_hir/src/source_binder.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir/src/source_binder.rs') 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::{ expr::{ExprId, PatId}, path::known, resolver::{self, resolver_for_scope, HasResolver, Resolver, TypeNs, ValueNs}, - DefWithBodyId, + AssocItemId, DefWithBodyId, }; use hir_expand::{ hygiene::Hygiene, name::AsName, AstId, HirFileId, MacroCallId, MacroFileKind, Source, @@ -380,7 +380,7 @@ impl SourceAnalyzer { name, method_resolution::LookupMode::MethodCall, |ty, it| match it { - AssocItem::Function(f) => callback(ty, f), + AssocItemId::FunctionId(f) => callback(ty, f.into()), _ => None, }, ) @@ -391,7 +391,7 @@ impl SourceAnalyzer { db: &impl HirDatabase, ty: &Type, name: Option<&Name>, - callback: impl FnMut(&Ty, AssocItem) -> Option, + mut callback: impl FnMut(&Ty, AssocItem) -> Option, ) -> Option { // There should be no inference vars in types passed here // FIXME check that? @@ -403,7 +403,7 @@ impl SourceAnalyzer { &self.resolver, name, method_resolution::LookupMode::Path, - callback, + |ty, it| callback(ty, it.into()), ) } -- cgit v1.2.3