diff --git a/tokio/src/io/split.rs b/tokio/src/io/split.rs index 8258a0f7a08..a3aa9d60c07 100644 --- a/tokio/src/io/split.rs +++ b/tokio/src/io/split.rs @@ -74,7 +74,10 @@ impl ReadHalf { /// same `split` operation this method will panic. /// This can be checked ahead of time by comparing the stream ID /// of the two halves. - pub fn unsplit(self, wr: WriteHalf) -> T { + pub fn unsplit(self, wr: WriteHalf) -> T + where + T: Unpin, + { if self.is_pair_of(&wr) { drop(wr);