os-rust/tests/ui/mir/remove-zsts-query-cycle.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
399 B
Rust
Raw Normal View History

// Regression test for #88972. Used to cause a query cycle:
2023-10-19 21:46:28 +00:00
// optimized mir -> remove zsts -> layout of a coroutine -> 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()
}