Fix crash on syn involving lifetimes returned by Chalk

If we get lifetime variables back in autoderef, just immediately replace
them by static lifetimes for now. Method resolution doesn't really deal
correctly with new variables being introduced (this needs to be fixed
more properly).

This fixes `rust-analyzer analysis-stats --with-deps` crashing in the RA
repo.
This commit is contained in:
Florian Diebold 2021-04-08 23:34:05 +02:00
parent 354151df35
commit 272a8dce4f
3 changed files with 77 additions and 6 deletions

View file

@ -609,6 +609,7 @@ fn iterate_trait_method_candidates(
}
}
known_implemented = true;
// FIXME: we shouldn't be ignoring the binders here
if callback(&self_ty.value, *item) {
return true;
}