fix: replace errors in receiver type when iterating method candidates

This commit is contained in:
Dawer 2021-09-27 21:44:27 +05:00
parent 009e6ceb1d
commit 11aed78e2b
2 changed files with 23 additions and 3 deletions

View file

@ -2601,9 +2601,7 @@ impl Type {
) {
// There should be no inference vars in types passed here
// FIXME check that?
// FIXME replace Unknown by bound vars here
let canonical =
Canonical { value: self.ty.clone(), binders: CanonicalVarKinds::empty(&Interner) };
let canonical = hir_ty::replace_errors_with_variables(&self.ty);
let env = self.env.clone();
let krate = krate.id;