Skip to content

Commit

Permalink
Rollup merge of rust-lang#92020 - Folyd:stream-unpin, r=m-ou-se
Browse files Browse the repository at this point in the history
Remove P: Unpin bound on impl Stream for Pin

Similar to rust-lang#81363.
  • Loading branch information
matthiaskrgr authored Dec 18, 2021
2 parents b19609b + 5c77116 commit b7cd8bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/stream/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ impl<S: ?Sized + Stream + Unpin> Stream for &mut S {
#[unstable(feature = "async_stream", issue = "79024")]
impl<P> Stream for Pin<P>
where
P: DerefMut + Unpin,
P: DerefMut,
P::Target: Stream,
{
type Item = <P::Target as Stream>::Item;

fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
self.get_mut().as_mut().poll_next(cx)
<P::Target as Stream>::poll_next(self.as_deref_mut(), cx)
}

fn size_hint(&self) -> (usize, Option<usize>) {
Expand Down

0 comments on commit b7cd8bf

Please sign in to comment.