diff options
| author | John Kugelman <john@kugelman.name> | 2021-10-10 19:50:52 -0400 |
|---|---|---|
| committer | John Kugelman <john@kugelman.name> | 2021-10-10 19:50:52 -0400 |
| commit | b115781bcd0609e94c08192924853097c73f1a1c (patch) | |
| tree | 4dee2d1f9c7ae135c842c9f5b6f16b63f0a0a5c7 /library/std/src/net/tcp.rs | |
| parent | 6928fafe06e4ab29317f75194e1bf67c119dccdc (diff) | |
| download | rust-b115781bcd0609e94c08192924853097c73f1a1c.tar.gz rust-b115781bcd0609e94c08192924853097c73f1a1c.zip | |
Add #[must_use] to conversions that move self
Diffstat (limited to 'library/std/src/net/tcp.rs')
| -rw-r--r-- | library/std/src/net/tcp.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/net/tcp.rs b/library/std/src/net/tcp.rs index 223726d45d7..2c6e3930059 100644 --- a/library/std/src/net/tcp.rs +++ b/library/std/src/net/tcp.rs @@ -883,6 +883,7 @@ impl TcpListener { /// Ok(()) /// } /// ``` + #[must_use = "`self` will be dropped if the result is not used"] #[unstable(feature = "tcplistener_into_incoming", issue = "88339")] pub fn into_incoming(self) -> IntoIncoming { IntoIncoming { listener: self } |
