about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-05-09 23:56:17 +0200
committerGitHub <noreply@github.com>2019-05-09 23:56:17 +0200
commitf6df1f6c30b469cb9e65c5453a0efa03cbb6005e (patch)
tree3c26534878efa7713b6879a5d7b54fa1d9bd0bd6 /src/libstd
parentf27f14b60fd6ad5150dbbfd6413d8a0226ae42eb (diff)
parentdf41e4f695a057fb14fdbc63b9009dafe4d7f681 (diff)
downloadrust-f6df1f6c30b469cb9e65c5453a0efa03cbb6005e.tar.gz
rust-f6df1f6c30b469cb9e65c5453a0efa03cbb6005e.zip
Rollup merge of #60675 - cramertj:no-await-macro, r=nikomatsakis,Centril
Remove the old await! macro

This doesn't work anymore, and its continued presence is cause for confusion. `yield` can no longer be used to return `Pending` from an `async` body.

cc https://github.com/rust-lang/rust/issues/60660
cc @taiki-e
cc https://github.com/tokio-rs/tokio/pull/1080
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/macros.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 9eba76cc04a..03aebeda47c 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -357,29 +357,6 @@ macro_rules! dbg {
     };
 }
 
-/// Awaits the completion of an async call.
-#[macro_export]
-#[unstable(feature = "await_macro", issue = "50547")]
-#[allow_internal_unstable(gen_future, generators)]
-#[allow_internal_unsafe]
-macro_rules! r#await {
-    ($e:expr) => { {
-        let mut pinned = $e;
-        loop {
-            if let $crate::task::Poll::Ready(x) =
-                $crate::future::poll_with_tls_context(unsafe {
-                    $crate::pin::Pin::new_unchecked(&mut pinned)
-                })
-            {
-                break x;
-            }
-            // FIXME(cramertj) prior to stabilizing await, we have to ensure that this
-            // can't be used to create a generator on stable via `|| await!()`.
-            yield
-        }
-    } }
-}
-
 /// Selects the first successful receive event from a number of receivers.
 ///
 /// This macro is used to wait for the first event to occur on a number of