aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/method_resolution.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-08 22:34:05 +0100
committerFlorian Diebold <[email protected]>2021-04-09 10:17:07 +0100
commit272a8dce4f603b38e7755bcd2dc8abb6437e6e64 (patch)
tree664e370487dae360665746ab32986b87e65b22a6 /crates/hir_ty/src/method_resolution.rs
parent354151df3556c5e2989746aa01a5aeb620ee9baa (diff)
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.
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r--crates/hir_ty/src/method_resolution.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs
index be3e4f09a..1b60cb727 100644
--- a/crates/hir_ty/src/method_resolution.rs
+++ b/crates/hir_ty/src/method_resolution.rs
@@ -609,6 +609,7 @@ fn iterate_trait_method_candidates(
609 } 609 }
610 } 610 }
611 known_implemented = true; 611 known_implemented = true;
612 // FIXME: we shouldn't be ignoring the binders here
612 if callback(&self_ty.value, *item) { 613 if callback(&self_ty.value, *item) {
613 return true; 614 return true;
614 } 615 }