summaryrefslogtreecommitdiffstats
path: root/third_party/rust/tokio/tests/macros_pin.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/tokio/tests/macros_pin.rs')
-rw-r--r--third_party/rust/tokio/tests/macros_pin.rs13
1 files changed, 13 insertions, 0 deletions
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..da6e0be6ed
--- /dev/null
+++ b/third_party/rust/tokio/tests/macros_pin.rs
@@ -0,0 +1,13 @@
+async fn one() {}
+async fn two() {}
+
+#[tokio::test]
+async fn multi_pin() {
+ tokio::pin! {
+ let f1 = one();
+ let f2 = two();
+ }
+
+ (&mut f1).await;
+ (&mut f2).await;
+}