-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: Compute closure captures #14470
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
Conversation
e47135b
to
a611b26
Compare
Is there a way in salsa to get a query result only if it is calculated before? Currently, the display code for closure calls |
☔ The latest upstream changes (presumably #14436) made this pull request unmergeable. Please resolve the merge conflicts. |
136f1cd
to
ca56f2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't looked over everything yet, but as this is a rather big PR again, could you try splitting out the derive macro expansion change as its own PR? And if possible also the Forces reborrow of mutable references in method receiver,
part
☔ The latest upstream changes (presumably #14509) made this pull request unmergeable. Please resolve the merge conflicts. |
I think #12297 should be linked? I don't have too strong opinion here, but I'd rather have inlay hints rendering for closures configurable. I pretty much agree with this comment in that I don't usually care what Fn* traits closures implement. Current pseudo-Rust notation On the other hand, I'd love to see the information on hover! |
Ah, I forgot that it was controversial last time. Will make it configurable. |
Always reborrow mutable reference receiver in methods Dependency of #14470
Add bounds for fields in derive macro Dependency of #14470
070a734
to
7bb6683
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Ah sorry, I should check these always. Will look at it. |
Ah I think this is in part due to the dangling temporary |
Type inference for nested closures is broken it seems. Still looking. |
Should we revert this PR for now (so you don't have the stress of having to fix this immediately?), and maybe just pick the hir-def pieces and what not that don't break things yet |
Since this is big, and I have some uncommited changes on top of it, reverting it makes some git headache for me. I will file a revert tomorrow if the fix is not trivial. |
Fix inference in nested closures fix #14470 (comment)
@Veykril it looks like metric is now back, but I didn't change anything related to the dangling |
Just an assumption thoug I mightve misunderstood parts of the code. Do note thoug that we are not fully back to prior this PR in terms on unknown types, so it would be nice to figure out what else regressed here. |
This PR:
|arg1: ty1, arg2: ty| -> ret
toimpl FnX(arg1: ty1, arg2: ty2) -> ret
fix #12297