aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_binder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r--crates/ra_hir/src/source_binder.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 0398806fd..82e6eb852 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -27,7 +27,7 @@ use crate::{
27 }, 27 },
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::{self, implements_trait},
31 AssocItem, Const, DefWithBody, Either, Enum, FromSource, Function, HasBody, HirFileId, 31 AssocItem, Const, DefWithBody, Either, Enum, FromSource, Function, HasBody, HirFileId,
32 MacroDef, Module, Name, Path, Resolver, Static, Struct, Ty, 32 MacroDef, Module, Name, Path, Resolver, Static, Struct, Ty,
33}; 33};
@@ -327,17 +327,19 @@ 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 mode: method_resolution::LookupMode,
330 callback: impl FnMut(&Ty, AssocItem) -> Option<T>, 331 callback: impl FnMut(&Ty, AssocItem) -> Option<T>,
331 ) -> Option<T> { 332 ) -> Option<T> {
332 // There should be no inference vars in types passed here 333 // There should be no inference vars in types passed here
333 // FIXME check that? 334 // FIXME check that?
335 // FIXME replace Unknown by bound vars here
334 let canonical = crate::ty::Canonical { value: ty, num_vars: 0 }; 336 let canonical = crate::ty::Canonical { value: ty, num_vars: 0 };
335 crate::ty::method_resolution::iterate_method_candidates( 337 method_resolution::iterate_method_candidates(
336 &canonical, 338 &canonical,
337 db, 339 db,
338 &self.resolver, 340 &self.resolver,
339 name, 341 name,
340 crate::ty::method_resolution::LookupMode::MethodCall, 342 mode,
341 callback, 343 callback,
342 ) 344 )
343 } 345 }