-
Notifications
You must be signed in to change notification settings - Fork 13.3k
trans: Fix missing closure env drop-glue in trans-item collector. #38822
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
trans: Fix missing closure env drop-glue in trans-item collector. #38822
Conversation
@bors r+ |
📌 Commit ab8fff2 has been approved by |
@eddyb I just pushed a commit with an additional fix. Could you please review that too? |
@bors r+ |
📌 Commit 8b94267 has been approved by |
trans: Fix missing closure env drop-glue in trans-item collector. FnOnce adapters automatically generated by the compiler introduce a call to drop the closure environment. The collector didn't pick up on that because this drop call does not show up in MIR. That could lead to an assertion being triggered if the drop-glue for the environment wasn't instantiated via something else. Fixes #38810 cc @arielb1 r? @eddyb or @nikomatsakis
☀️ Test successful - status-appveyor, status-travis |
@michaelwoerister, @eddyb |
The main reason is that the failure cannot show up with the current CGU partitioning scheme, only with different scheme I have in a local branch. But I'll try to come up with a test case once that scheme gets merged. |
FnOnce adapters automatically generated by the compiler introduce a call to drop the closure environment. The collector didn't pick up on that because this drop call does not show up in MIR. That could lead to an assertion being triggered if the drop-glue for the environment wasn't instantiated via something else.
Fixes #38810
cc @arielb1
r? @eddyb or @nikomatsakis