-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[hir-ty] Missed RPIT in ide/src/rename.rs
#19439
Comments
Could you tell me what project causes that panic? Or I think that you could reproduce it by running |
Sounds like it's panicking on r-a itself, but yeah, we want analysis-stats to catch it. |
Ah, it sounds like that indeed 😅 |
|
Did that module panicked? The log shows nothing abnormal 🤔 |
So far, with a release build, there is no sign of failure. I'm trying to reproduce it with a local debug build of rust-analyzer. I'll let you know once I'm able to isolate the panic. If this doesn't work, I'll put up a proof-of-concept project where I can reproduce the exact problem. |
I'll try it with a debug build, too |
Here's you go: https://github.com/snprajwal/ra-rpit-failure Just change the There is also the chance that I'm doing something incorrectly during the setup - if you do figure that out, please let me know :) |
I've written a tool that walks the AST and resolves all exprs, collecting the types. I've tested this on other big projects in debug mode (notably rustfmt) and it works fine. Running it on rust-analyzer itself causes it to panic on line 206 in
ide/src/rename.rs
withMissed RPIT in `insert_inference_vars_for_rpit`
.rust-analyzer/crates/ide/src/rename.rs
Lines 204 to 208 in dd2354c
The error is coming from here:
rust-analyzer/crates/hir-ty/src/infer.rs
Lines 980 to 982 in dd2354c
Not sure how to reproduce this with a test or code action. No issues in release mode since
never!
doesn't show up without debug assertions.The text was updated successfully, but these errors were encountered: