diff options
Diffstat (limited to 'tests-integration')
-rw-r--r-- | tests-integration/tests/macros_pin.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests-integration/tests/macros_pin.rs b/tests-integration/tests/macros_pin.rs new file mode 100644 index 00000000..37d8f70f --- /dev/null +++ b/tests-integration/tests/macros_pin.rs @@ -0,0 +1,12 @@ +use futures::executor::block_on; + +async fn my_async_fn() {} + +#[test] +fn pin() { + block_on(async { + let future = my_async_fn(); + tokio::pin!(future); + (&mut future).await + }); +} |