Rollup merge of #141932 - azhogin:azhogin/async-drop-inside-asyncgen-fix, r=oli-obk
Fix for async drop inside async gen fn Return value (for yield) is corrected for async drop inside async gen function. In CFG, when internal async drop future is polled and returned `Poll<()>::Pending`, then async gen resume function returns `Poll<(OptRet)>::Pending`. Fixes rust-lang/rust#140530
This commit is contained in:
commit
9ec41bcf72
2 changed files with 31 additions and 8 deletions
|
|
@ -1,7 +1,8 @@
|
|||
//@ known-bug: #140530
|
||||
// ex-ice: #140530
|
||||
//@ edition: 2024
|
||||
|
||||
//@ build-pass
|
||||
#![feature(async_drop, gen_blocks)]
|
||||
#![allow(incomplete_features)]
|
||||
async gen fn a() {
|
||||
_ = async {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue