Skip to content

Commit 7fdfdd5

Browse files
committed
Reduce top-level re-exports
1 parent f02c36b commit 7fdfdd5

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

futures-core/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ compile_error!("The `cfg-target-has-atomic` feature requires the `unstable` feat
2020
extern crate alloc;
2121

2222
pub mod future;
23-
#[doc(hidden)] pub use self::future::{Future, FusedFuture, TryFuture};
2423

2524
pub mod stream;
26-
#[doc(hidden)] pub use self::stream::{Stream, FusedStream, TryStream};
2725

2826
#[macro_use]
2927
pub mod task;
3028

29+
// Not public API.
3130
#[doc(hidden)]
3231
pub mod core_reexport {
3332
#[doc(hidden)]

futures-util/src/compat/compat01as03.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use futures_01::{
88
};
99
#[cfg(feature = "sink")]
1010
use futures_01::{AsyncSink as AsyncSink01, Sink as Sink01};
11-
use futures_core::{task as task03, Future as Future03, Stream as Stream03};
11+
use futures_core::{task as task03, future::Future as Future03, stream::Stream as Stream03};
1212
use std::pin::Pin;
1313
use std::task::Context;
1414
#[cfg(feature = "sink")]

futures-util/src/compat/compat03as01.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use futures_01::{
88
};
99
use futures_core::{
1010
task::{RawWaker, RawWakerVTable},
11-
TryFuture as TryFuture03,
12-
TryStream as TryStream03,
11+
future::TryFuture as TryFuture03,
12+
stream::TryStream as TryStream03,
1313
};
1414
#[cfg(feature = "sink")]
1515
use futures_sink::Sink as Sink03;

futures-util/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ extern crate futures_core;
2929
pub use futures_core::ready;
3030
pub use pin_utils::pin_mut;
3131

32+
// Not public API.
3233
#[cfg(feature = "std")]
3334
#[cfg(feature = "async-await")]
3435
#[macro_use]
@@ -39,6 +40,7 @@ pub mod async_await;
3940
#[doc(hidden)]
4041
pub use self::async_await::*;
4142

43+
// Not public API.
4244
#[doc(hidden)]
4345
pub use futures_core::core_reexport;
4446

@@ -105,7 +107,6 @@ pub mod sink;
105107
pub mod task;
106108

107109
pub mod never;
108-
#[doc(hidden)] pub use crate::never::Never;
109110

110111
#[cfg(feature = "compat")]
111112
pub mod compat;

futures/src/lib.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ compile_error!("The `cfg-target-has-atomic` feature requires the `unstable` feat
4040
#[cfg(all(feature = "bilock", not(feature = "unstable")))]
4141
compile_error!("The `bilock` feature requires the `unstable` feature as an explicit opt-in to unstable features");
4242

43-
#[doc(hidden)] pub use futures_core::core_reexport;
44-
4543
#[doc(hidden)] pub use futures_core::future::Future;
4644
#[doc(hidden)] pub use futures_core::future::TryFuture;
4745
#[doc(hidden)] pub use futures_util::future::FutureExt;
@@ -60,8 +58,6 @@ compile_error!("The `bilock` feature requires the `unstable` feature as an expli
6058
#[cfg(feature = "std")]
6159
#[doc(hidden)] pub use futures_util::{AsyncReadExt, AsyncWriteExt, AsyncSeekExt, AsyncBufReadExt};
6260

63-
#[doc(hidden)] pub use futures_util::never::Never;
64-
6561
// Macro reexports
6662
pub use futures_core::ready; // Readiness propagation
6763
pub use futures_util::pin_mut;
@@ -522,11 +518,17 @@ pub mod never {
522518

523519
// proc-macro re-export --------------------------------------
524520

521+
// Not public API.
522+
#[doc(hidden)]
523+
pub use futures_core::core_reexport;
524+
525+
// Not public API.
525526
#[cfg(feature = "std")]
526527
#[cfg(feature = "async-await")]
527528
#[doc(hidden)]
528529
pub use futures_util::async_await;
529530

531+
// Not public API.
530532
#[cfg(feature = "std")]
531533
#[cfg(feature = "async-await")]
532534
#[doc(hidden)]

0 commit comments

Comments
 (0)