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]
async_fn_is_send()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]
async_block_is_send()16 fn async_block_is_send() {
17     assert_send(async {
18         tracing::info!("{}", future::ready("test").await);
19     })
20 }
21 
assert_send<F: Future + Send>(_f: F)22 fn assert_send<F: Future + Send>(_f: F) {}
23