aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_binder.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-05-01 16:57:56 +0100
committerFlorian Diebold <[email protected]>2019-05-04 17:18:30 +0100
commit0ad7317b24dc90c3787482f9ec563e7830d499fc (patch)
treeb065393029bb8d886c3562af2e0fbcf1bc62a0e6 /crates/ra_hir/src/source_binder.rs
parentef77d8375130d12678d4b2316cc1708c90349dad (diff)
Canonicalize before doing method resolution
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r--crates/ra_hir/src/source_binder.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 2959e3eca..24350bda7 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -350,7 +350,16 @@ impl SourceAnalyzer {
350 name: Option<&Name>, 350 name: Option<&Name>,
351 callback: impl FnMut(&Ty, Function) -> Option<T>, 351 callback: impl FnMut(&Ty, Function) -> Option<T>,
352 ) -> Option<T> { 352 ) -> Option<T> {
353 ty.iterate_method_candidates(db, &self.resolver, name, callback) 353 // There should be no inference vars in types passed here
354 // TODO check that?
355 let canonical = crate::ty::Canonical { value: ty, num_vars: 0 };
356 crate::ty::method_resolution::iterate_method_candidates(
357 &canonical,
358 db,
359 &self.resolver,
360 name,
361 callback,
362 )
354 } 363 }
355 364
356 #[cfg(test)] 365 #[cfg(test)]