summaryrefslogtreecommitdiffstats
path: root/tests/ui/mir/remove-zsts-query-cycle.rs
blob: be4d68f2de70714cce3a3fc8507a9223a9f4d4c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Regression test for #88972. Used to cause a query cycle:
//   optimized mir -> remove zsts -> layout of a generator -> optimized mir.
//
// edition:2018
// compile-flags: --crate-type=lib -Zinline-mir=yes
// build-pass

pub async fn listen() -> Result<(), std::io::Error> {
    let f = do_async();
    std::mem::forget(f);
    Ok(())
}

pub async fn do_async() {
    listen().await.unwrap()
}