diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-27 09:34:54 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-27 09:34:54 +0000 |
commit | 84bd7916ffa91081e8938d15c673142498442042 (patch) | |
tree | 24e9543a78e13477a85c38f98a58f402d7a40ef9 /crates/ra_hir/src/source_binder.rs | |
parent | 57ad4542b6c7fdfeb3b6abc4cd1a4243495694df (diff) | |
parent | 825049bc6247f6d596910cd99f76f891d5435a86 (diff) |
Merge #2426
2426: Decouple r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 8 |
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 | }; |
16 | use hir_expand::{ | 16 | use 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 | ||