2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2023-10-19 16:46:28 -05:00
|
|
|
// Checks that inliner doesn't introduce cycles when optimizing coroutines.
|
2020-09-01 19:00:00 -05:00
|
|
|
// 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();
|
|
|
|
}
|
|
|
|
}
|