Commit 9026b30
committed
Auto merge of #156649 - cjgillot:move-async-expand, r=nnethercote
Expand async drops during drop elaboration
Async drops implemented by rust-lang/rust#123948 are expanded in await loops inside `StateTransform`. I find this odd, as `StateTransform` is 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 rust-lang/rust#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 @zetanumbers0 file changed
0 commit comments