feat: Compute closure captures#14470
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
|
☔ 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| -> rettoimpl FnX(arg1: ty1, arg2: ty2) -> retfix #12297