-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix panic with impl trait associated types in where clause #16830
Conversation
89da596
to
9582885
Compare
The root cause of this is my wrong assumption in #16769 😢 rust-analyzer/crates/hir-ty/src/lower.rs Lines 1125 to 1141 in 5ecace4
In the above My intention was to handle case when the rust-analyzer/crates/hir-ty/src/lower.rs Lines 1109 to 1112 in 5ecace4
like the case at here (it's Path - R<impl Y, T>> , not ImplTrait - impl Y )rust-analyzer/crates/hir-ty/src/tests/traits.rs Line 1255 in 5ecace4
and I think that the direct ImplTrait cases can be handled with preivious "redirecting lowered bounds" stretagy in these lines (and the recusive impl trait bounds inside that I intended to fix can still be handled properly as it triggers assoc_type_bindings_from_type_bound again in lower_type_bound )rust-analyzer/crates/hir-ty/src/lower.rs Lines 1113 to 1121 in 5ecace4
So, I think that your PR is proper and effective 👍 |
Thanks! |
☀️ Test successful - checks-actions |
Not sure if this is the correct fix, but the tests are green :')
Fixes #16823