Commit 05b8202
authored
Rollup merge of rust-lang#158904 - KR-bluejay:issue-142559-fix, r=oli-obk
Fix FutureDropPoll shim for by-move async closures
Related rust-lang#142559
When the coroutine is coroutine-closures, `build_adrop_for_coroutine_shim` used the the ref of the coroutine body.
This PR uses `coroutine_by_move_body_def_id` to fetch the by-move body.
(matching the existing `DropGlue` behavior in `shim.rs`)2 files changed
Lines changed: 33 additions & 1 deletion
File tree
- compiler/rustc_mir_transform/src/shim
- tests/ui/async-await/async-drop
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
207 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
208 | 223 | | |
209 | 224 | | |
210 | 225 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments