Expand async drops during drop elaboration#156649
Conversation
|
This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @vakaras Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri This PR changes rustc_public cc @oli-obk, @celinval, @ouz-a, @makai410 The Cranelift subtree was changed cc @bjorn3 Some changes occurred to the CTFE machinery |
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
1ed6528 to
20114b0
Compare
|
Is there some relation to #156495 or would that PR be orthogonal to this one? |
This comment has been minimized.
This comment has been minimized.
It should be orthogonal. |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Async drops implemented by #123948 are expanded in await loops inside
StateTransform. I find this odd, asStateTransformis tasked with removing yields from MIR.This PR moves this
async drop-> loop transformation to drop elaboration.The first few commits create many mir-opt tests to gauge the effect of following commits. I can easily trim those.
The next few commits are from #156422.
Then come a few commits performing elementary simplifications to drop elaboration code.
The most important commit is
Expand async drops during drop elaboration.It performs the main change and attempts to document what I had to understand doing that.The last commit is a cleanup.
This is a large PR, but most of the diff is in generated files. I can easily split them, each commit compiles and passes tests on its own.
cc @zetanumbers