Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stabilization marker for future_readiness_fns #76759

Merged
merged 1 commit into from
Sep 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/core/src/future/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ pub use self::future::Future;
#[unstable(feature = "into_future", issue = "67644")]
pub use into_future::IntoFuture;

#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
pub use pending::{pending, Pending};
#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
pub use ready::{ready, Ready};

#[unstable(feature = "future_poll_fn", issue = "72302")]
Expand Down
12 changes: 6 additions & 6 deletions library/core/src/future/pending.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::task::{Context, Poll};
/// documentation for more.
///
/// [`pending`]: fn.pending.html
#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
#[must_use = "futures do nothing unless you `.await` or poll them"]
pub struct Pending<T> {
_data: marker::PhantomData<T>,
Expand All @@ -31,12 +31,12 @@ pub struct Pending<T> {
/// unreachable!();
/// # }
/// ```
#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
pub fn pending<T>() -> Pending<T> {
Pending { _data: marker::PhantomData }
}

#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
impl<T> Future for Pending<T> {
type Output = T;

Expand All @@ -45,17 +45,17 @@ impl<T> Future for Pending<T> {
}
}

#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
impl<T> Unpin for Pending<T> {}

#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
impl<T> Debug for Pending<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Pending").finish()
}
}

#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
impl<T> Clone for Pending<T> {
fn clone(&self) -> Self {
pending()
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/future/ready.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ use crate::task::{Context, Poll};
/// documentation for more.
///
/// [`ready`]: fn.ready.html
#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
#[derive(Debug, Clone)]
#[must_use = "futures do nothing unless you `.await` or poll them"]
pub struct Ready<T>(Option<T>);

#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
impl<T> Unpin for Ready<T> {}

#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
impl<T> Future for Ready<T> {
type Output = T;

Expand All @@ -42,7 +42,7 @@ impl<T> Future for Ready<T> {
/// assert_eq!(a.await, 1);
/// # }
/// ```
#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
pub fn ready<T>(t: T) -> Ready<T> {
Ready(Some(t))
}
2 changes: 1 addition & 1 deletion library/std/src/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub use core::future::Future;
pub use core::future::{from_generator, get_context, ResumeTy};

#[doc(inline)]
#[stable(feature = "future_readiness_fns", since = "1.47.0")]
#[stable(feature = "future_readiness_fns", since = "1.48.0")]
pub use core::future::{pending, ready, Pending, Ready};

#[doc(inline)]
Expand Down