From 902904a79a5498438e93f41d728615b54c679f19 Mon Sep 17 00:00:00 2001 From: Daiki Mizukami Date: Wed, 24 Apr 2019 20:12:24 +0900 Subject: std: Derive `Default` for `io::Cursor` --- src/libstd/io/cursor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/io/cursor.rs b/src/libstd/io/cursor.rs index 247d45c3ec9..abef36e7b2e 100644 --- a/src/libstd/io/cursor.rs +++ b/src/libstd/io/cursor.rs @@ -72,7 +72,7 @@ use core::convert::TryInto; /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct Cursor { inner: T, pos: u64, -- cgit 1.4.1-3-g733a5 From df41e4f695a057fb14fdbc63b9009dafe4d7f681 Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Thu, 9 May 2019 10:49:39 -0700 Subject: Remove the old await! macro This doesn't work anymore, and its continued presence is cause for confusion. --- src/libstd/macros.rs | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/libstd') 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 -- cgit 1.4.1-3-g733a5