From f186fd071616e31a4b0a1475e7aceccbc678991c Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Fri, 30 Aug 2019 04:19:04 +0900 Subject: [PATCH] Move Never type from futures-core to futures-util --- futures-core/src/lib.rs | 3 --- futures-util/src/future/never_error.rs | 2 +- futures-util/src/lib.rs | 3 +++ {futures-core => futures-util}/src/never.rs | 0 futures-util/src/sink/drain.rs | 2 +- futures/src/lib.rs | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) rename {futures-core => futures-util}/src/never.rs (100%) diff --git a/futures-core/src/lib.rs b/futures-core/src/lib.rs index 615370d397..a7d5299fb5 100644 --- a/futures-core/src/lib.rs +++ b/futures-core/src/lib.rs @@ -29,9 +29,6 @@ pub mod stream; pub mod task; #[doc(hidden)] pub use self::task::Poll; -pub mod never; -#[doc(hidden)] pub use self::never::Never; - #[doc(hidden)] pub mod core_reexport { #[doc(hidden)] diff --git a/futures-util/src/future/never_error.rs b/futures-util/src/future/never_error.rs index 6e8094c118..5a68e6f952 100644 --- a/futures-util/src/future/never_error.rs +++ b/futures-util/src/future/never_error.rs @@ -1,7 +1,7 @@ +use crate::never::Never; use core::pin::Pin; use futures_core::future::{FusedFuture, Future}; use futures_core::task::{self, Poll}; -use futures_core::never::Never; use pin_utils::unsafe_pinned; /// Future for the [`never_error`](super::FutureExt::never_error) combinator. diff --git a/futures-util/src/lib.rs b/futures-util/src/lib.rs index ef216e650e..1216768851 100644 --- a/futures-util/src/lib.rs +++ b/futures-util/src/lib.rs @@ -112,6 +112,9 @@ pub mod sink; pub mod task; +pub mod never; +#[doc(hidden)] pub use crate::never::Never; + #[cfg(feature = "compat")] pub mod compat; diff --git a/futures-core/src/never.rs b/futures-util/src/never.rs similarity index 100% rename from futures-core/src/never.rs rename to futures-util/src/never.rs diff --git a/futures-util/src/sink/drain.rs b/futures-util/src/sink/drain.rs index f6eed3cf80..46de83b7c2 100644 --- a/futures-util/src/sink/drain.rs +++ b/futures-util/src/sink/drain.rs @@ -1,7 +1,7 @@ +use crate::never::Never; use core::marker::PhantomData; use core::pin::Pin; use futures_core::task::{Context, Poll}; -use futures_core::never::Never; use futures_sink::Sink; /// Sink for the [`drain`] function. diff --git a/futures/src/lib.rs b/futures/src/lib.rs index 3cfef84425..747ffd59b6 100644 --- a/futures/src/lib.rs +++ b/futures/src/lib.rs @@ -62,7 +62,7 @@ compile_error!("The `bilock` feature requires the `unstable` feature as an expli #[doc(hidden)] pub use futures_core::task::Poll; -#[doc(hidden)] pub use futures_core::never::Never; +#[doc(hidden)] pub use futures_util::never::Never; // Macro reexports pub use futures_core::ready; // Readiness propagation @@ -519,7 +519,7 @@ pub mod never { //! //! Values of this type can never be created and will never exist. - pub use futures_core::never::Never; + pub use futures_util::never::Never; } // proc-macro re-export --------------------------------------