From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- third_party/rust/tokio/tests/macros_pin.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 third_party/rust/tokio/tests/macros_pin.rs (limited to 'third_party/rust/tokio/tests/macros_pin.rs') diff --git a/third_party/rust/tokio/tests/macros_pin.rs b/third_party/rust/tokio/tests/macros_pin.rs new file mode 100644 index 0000000000..70c95a1c82 --- /dev/null +++ b/third_party/rust/tokio/tests/macros_pin.rs @@ -0,0 +1,21 @@ +#![cfg(feature = "macros")] + +#[cfg(target_arch = "wasm32")] +use wasm_bindgen_test::wasm_bindgen_test as maybe_tokio_test; + +#[cfg(not(target_arch = "wasm32"))] +use tokio::test as maybe_tokio_test; + +async fn one() {} +async fn two() {} + +#[maybe_tokio_test] +async fn multi_pin() { + tokio::pin! { + let f1 = one(); + let f2 = two(); + } + + (&mut f1).await; + (&mut f2).await; +} -- cgit v1.2.3