This commit is contained in:
Aleksey Kladov
2019-11-26 22:56:07 +03:00
parent cace49e9a7
commit bed6869865
6 changed files with 85 additions and 77 deletions

View File

@@ -389,14 +389,14 @@ impl SourceAnalyzer {
pub fn iterate_path_candidates<T>(
&self,
db: &impl HirDatabase,
ty: Ty,
ty: &Type,
name: Option<&Name>,
callback: impl FnMut(&Ty, AssocItem) -> Option<T>,
) -> Option<T> {
// There should be no inference vars in types passed here
// FIXME check that?
// FIXME replace Unknown by bound vars here
let canonical = crate::ty::Canonical { value: ty, num_vars: 0 };
let canonical = crate::ty::Canonical { value: ty.ty.value.clone(), num_vars: 0 };
method_resolution::iterate_method_candidates(
&canonical,
db,