about summary refs log tree commit diff
path: root/tests/coverage/async_closure.coverage
blob: 10a8ea14504b36447145530e7a426c69b9c52da2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
   LL|       |//@ edition: 2021
   LL|       |
   LL|       |//@ aux-build: executor.rs
   LL|       |extern crate executor;
   LL|       |
   LL|      1|async fn call_once(f: impl AsyncFnOnce()) {
   LL|      1|    f().await;
   LL|      1|}
   LL|       |
   LL|      1|pub fn main() {
   LL|      2|    let async_closure = async || {};
                                               ^1
  ------------------
  | async_closure::main::{closure#0}:
  |   LL|      1|    let async_closure = async || {};
  ------------------
  | async_closure::main::{closure#0}:
  |   LL|      1|    let async_closure = async || {};
  ------------------
   LL|      1|    executor::block_on(async_closure());
   LL|      1|    executor::block_on(call_once(async_closure));
   LL|      1|}