]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/inline/inline_async.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / mir-opt / inline / inline_async.rs
1 // Checks that inliner doesn't introduce cycles when optimizing generators.
2 // The outcome of optimization is not verfied, just the absence of the cycle.
3 // Regression test for #76181.
4 //
5 // edition:2018
6
7 #![crate_type = "lib"]
8
9 pub struct S;
10
11 impl S {
12     pub async fn g(&mut self) {
13         self.h();
14     }
15     pub fn h(&mut self) {
16         let _ = self.g();
17     }
18 }