]> git.lizzy.rs Git - rust.git/blob - tests/ui/mir/remove-zsts-query-cycle.rs
Auto merge of #107443 - cjgillot:generator-less-query, r=compiler-errors
[rust.git] / tests / ui / mir / remove-zsts-query-cycle.rs
1 // Regression test for #88972. Used to cause a query cycle:
2 //   optimized mir -> remove zsts -> layout of a generator -> optimized mir.
3 //
4 // edition:2018
5 // compile-flags: --crate-type=lib -Zinline-mir=yes
6 // build-pass
7
8 pub async fn listen() -> Result<(), std::io::Error> {
9     let f = do_async();
10     std::mem::forget(f);
11     Ok(())
12 }
13
14 pub async fn do_async() {
15     listen().await.unwrap()
16 }