summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/inline/inline_async.rs
blob: 1de87e1e43cf6665ac0314cca91fb00867a28f6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// skip-filecheck
// Checks that inliner doesn't introduce cycles when optimizing coroutines.
// 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();
    }
}