1 | // These tests reproduce the following issues: |
2 | // - https://github.com/tokio-rs/tracing/issues/1487 |
3 | // - https://github.com/tokio-rs/tracing/issues/1793 |
4 | |
5 | use core::future::{self, Future}; |
6 | #[test] |
7 | fn async_fn_is_send() { |
8 | async fn some_async_fn() { |
9 | tracing::info!("{}" , future::ready("test" ).await); |
10 | } |
11 | |
12 | assert_send(some_async_fn()) |
13 | } |
14 | |
15 | #[test] |
16 | fn async_block_is_send() { |
17 | assert_send(async { |
18 | tracing::info!("{}" , future::ready("test" ).await); |
19 | }) |
20 | } |
21 | |
22 | fn assert_send<F: Future + Send>(_f: F) {} |
23 | |