Debian Codegraph @

third_party/rust/tokio/tests/macros_pin.rs

raw
1 #![cfg(feature = "macros")]
2
3 #[cfg(all(target_family = "wasm", not(target_os = "wasi")))]
4 use wasm_bindgen_test::wasm_bindgen_test as maybe_tokio_test;
5
6 #[cfg(not(all(target_family = "wasm", not(target_os = "wasi"))))]
7 use tokio::test as maybe_tokio_test;
8
9 async fn one() {}
10 async fn two() {}
11
12 #[maybe_tokio_test]
13 async fn multi_pin() {
14 tokio::pin! {
15 let f1 = one();
16 let f2 = two();
17 }
18
19 (&mut f1).await;
20 (&mut f2).await;
21 }