about summary refs log tree commit diff
path: root/tests/ui/async-await/async-closures/validate-synthetic-body.rs
blob: 3fd7382f7f9b9557a6012c204ac7d55fffac557a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ check-pass
//@ edition: 2021

// Make sure that we don't hit a query cycle when validating
// the by-move coroutine body for an async closure.

use std::future::Future;

async fn test<Fut: Future>(operation: impl Fn() -> Fut) {
    operation().await;
}

pub async fn orchestrate_simple_crud() {
    test(async || async {}.await).await;
}

fn main() {}