diff --git a/library/core/src/stream/stream.rs b/library/core/src/stream/stream.rs index d102619b8e5ec..2cfddf9ad013d 100644 --- a/library/core/src/stream/stream.rs +++ b/library/core/src/stream/stream.rs @@ -95,13 +95,13 @@ impl Stream for &mut S { #[unstable(feature = "async_stream", issue = "79024")] impl

Stream for Pin

where - P: DerefMut + Unpin, + P: DerefMut, P::Target: Stream, { type Item = ::Item; fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { - self.get_mut().as_mut().poll_next(cx) + ::poll_next(self.as_deref_mut(), cx) } fn size_hint(&self) -> (usize, Option) {