Skip to content

Commit 3a6e75c

Browse files
committed
fix pending stabilization
1 parent 741e938 commit 3a6e75c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/stream/pending.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ use core::marker::PhantomData;
22
use core::pin::Pin;
33
use core::task::{Context, Poll};
44

5-
use crate::stream::{DoubleEndedStream, ExactSizeStream, FusedStream, Stream};
5+
cfg_unstable! {
6+
use crate::stream::{DoubleEndedStream, ExactSizeStream, FusedStream};
7+
}
8+
9+
use crate::stream::Stream;
610

711
/// A stream that never returns any items.
812
///
@@ -53,14 +57,20 @@ impl<T> Stream for Pending<T> {
5357
}
5458
}
5559

60+
#[cfg(feature = "unstable")]
61+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
5662
impl<T> DoubleEndedStream for Pending<T> {
5763
fn poll_next_back(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Option<T>> {
5864
Poll::Pending
5965
}
6066
}
6167

68+
#[cfg(feature = "unstable")]
69+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
6270
impl<T> FusedStream for Pending<T> {}
6371

72+
#[cfg(feature = "unstable")]
73+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
6474
impl<T> ExactSizeStream for Pending<T> {
6575
fn len(&self) -> usize {
6676
0

0 commit comments

Comments
 (0)