]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-61986.rs
Auto merge of #83152 - guswynn:jemallocator_part2, r=Mark-Simulacrum
[rust.git] / src / test / ui / async-await / issues / issue-61986.rs
1 // build-pass (FIXME(62277): could be check-pass?)
2 // edition:2018
3 //
4 // Tests that we properly handle StorageDead/StorageLives for temporaries
5 // created in async loop bodies.
6
7 async fn bar() -> Option<()> {
8     Some(())
9 }
10
11 async fn listen() {
12     while let Some(_) = bar().await {
13         String::new();
14     }
15 }
16
17 fn main() {
18     listen();
19 }