rust/tests/mir-opt/inline/inline_async.rs
2023-01-11 09:32:08 +00:00

19 lines
369 B
Rust

// Checks that inliner doesn't introduce cycles when optimizing generators.
// The outcome of optimization is not verfied, just the absence of the cycle.
// Regression test for #76181.
//
// edition:2018
#![crate_type = "lib"]
pub struct S;
impl S {
pub async fn g(&mut self) {
self.h();
}
pub fn h(&mut self) {
let _ = self.g();
}
}