From 5c7711623030f13f7e2a6f1c1078b68013c2b441 Mon Sep 17 00:00:00 2001 From: Folyd Date: Fri, 17 Dec 2021 11:14:02 +0800 Subject: [PATCH] Remove P: Unpin bound on impl Stream for Pin --- library/core/src/stream/stream.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {